pub fn validate_poll_title(title: &str) -> Result<(), ContractError> {
    if title.len() < MIN_TITLE_LENGTH {
        Err(ContractError::PollTitleInvalidShort(MIN_TITLE_LENGTH))
    } else if title.len() > MAX_TITLE_LENGTH {
        Err(ContractError::PollTitleInvalidLong(MAX_TITLE_LENGTH))
    } else {
        Ok(())
    }
}
/**
 * Validates that the title of the poll is valid, i.e. len() between [MIN_TITLE_LENGTH, MAX_TITLE_LENGTH].
 */
Validates that the title of the poll is valid, i.e.
Validates that the title of the poll is valid i . e .
pub fn validate_poll_title(title: &str) -> Result<(), ContractError> {
    if title.len() < MIN_TITLE_LENGTH {
        Err(ContractError::PollTitleInvalidShort(MIN_TITLE_LENGTH))
    } else if title.len() > MAX_TITLE_LENGTH {
        Err(ContractError::PollTitleInvalidLong(MAX_TITLE_LENGTH))
    } else {
        Ok(())
    }
}
pub fn validate_poll_title ( title : & str ) -> Result < ( ) , ContractError > { if title . len ( ) < MIN_TITLE_LENGTH { Err ( ContractError :: PollTitleInvalidShort ( MIN_TITLE_LENGTH ) ) } else if title . len ( ) > MAX_TITLE_LENGTH { Err ( ContractError :: PollTitleInvalidLong ( MAX_TITLE_LENGTH ) ) } else { Ok ( ( ) ) } }
Validates that the title of the poll is valid, i.e.
Validates that the title of the poll is valid i . e .
title
&str
title
&str