pub fn validate_poll_description(description: &str) -> Result<(), ContractError> {
    if description.len() < MIN_DESC_LENGTH {
        Err(ContractError::PollDescriptionInvalidShort(MIN_DESC_LENGTH))
    } else if description.len() > MAX_DESC_LENGTH {
        Err(ContractError::PollDescriptionInvalidLong(MAX_DESC_LENGTH))
    } else {
        Ok(())
    }
}
/**
 * Validates that the description of the poll is valid, i.e. len() between [MIN_DESC_LENGTH, MAX_DESC_LENGTH].
 */
Validates that the description of the poll is valid, i.e.
Validates that the description of the poll is valid i . e .
pub fn validate_poll_description(description: &str) -> Result<(), ContractError> {
    if description.len() < MIN_DESC_LENGTH {
        Err(ContractError::PollDescriptionInvalidShort(MIN_DESC_LENGTH))
    } else if description.len() > MAX_DESC_LENGTH {
        Err(ContractError::PollDescriptionInvalidLong(MAX_DESC_LENGTH))
    } else {
        Ok(())
    }
}
pub fn validate_poll_description ( description : & str ) -> Result < ( ) , ContractError > { if description . len ( ) < MIN_DESC_LENGTH { Err ( ContractError :: PollDescriptionInvalidShort ( MIN_DESC_LENGTH ) ) } else if description . len ( ) > MAX_DESC_LENGTH { Err ( ContractError :: PollDescriptionInvalidLong ( MAX_DESC_LENGTH ) ) } else { Ok ( ( ) ) } }
Validates that the description of the poll is valid, i.e.
Validates that the description of the poll is valid i . e .
description
&str
description
&str