pub fn validate_threshold(threshold: Decimal) -> Result<(), ContractError> {
    match validate_decimal_value(threshold, MAX_THRESHOLD) {
        Ok(_) => Ok(()),
        Err(_) => Err(ContractError::PollThresholdInvalidValue(
            MAX_THRESHOLD.to_string(),
        )),
    }
}
/**
 * Validates the threshold parameter used to instantiate the contract. It should be between [0,1].
 */
Validates the threshold parameter used to instantiate the contract. It should be between [0,1].
Validates the threshold parameter used to instantiate the contract . It should be between [ 0 1 ] .
pub fn validate_threshold(threshold: Decimal) -> Result<(), ContractError> {
    match validate_decimal_value(threshold, MAX_THRESHOLD) {
        Ok(_) => Ok(()),
        Err(_) => Err(ContractError::PollThresholdInvalidValue(
            MAX_THRESHOLD.to_string(),
        )),
    }
}
pub fn validate_threshold ( threshold : Decimal ) -> Result < ( ) , ContractError > { match validate_decimal_value ( threshold , MAX_THRESHOLD ) { Ok ( _ ) => Ok ( ( ) ) , Err ( _ ) => Err ( ContractError :: PollThresholdInvalidValue ( MAX_THRESHOLD . to_string ( ) , ) ) , } }
Validates the threshold parameter used to instantiate the contract.
Validates the threshold parameter used to instantiate the contract .
threshold
Decimal
threshold
Decimal