pub fn is_valid<T: AsRef<str>>(&self, data: &Option<T>) -> bool {
        let value = match data {
            Some(x) => x,
            None => return false,
        };

        match self.pattern.as_ref() {
            Some(re) => re.is_match(value.as_ref()),
            None => true,
        }
    }
/**
     * Checks if the message field contains a valid value
     * @return TRUE if the field contains a valid value, else FALSE
     */
Checks if the message field contains a valid value
@return TRUE if the field contains a valid value, else FALSE
Checks if the message field contains a valid value @return TRUE if the field contains a valid value else FALSE
pub fn is_valid<T: AsRef<str>>(&self, data: &Option<T>) -> bool {
        let value = match data {
            Some(x) => x,
            None => return false,
        };
        match self.pattern.as_ref() {
            Some(re) => re.is_match(value.as_ref()),
            None => true,
        }
    }
pub fn is_valid < T : AsRef < str > > ( & self , data : & Option < T > ) -> bool { let value = match data { Some ( x ) => x , None => return false , } ; match self . pattern . as_ref ( ) { Some ( re ) => re . is_match ( value . as_ref ( ) ) , None => true , } }
Checks if the message field contains a valid value
 @return TRUE if the field contains a valid value, else FALSE
Checks if the message field contains a valid value @return TRUE if the field contains a valid value else FALSE
&self
data
&Option<T>
&self
data
&Option<T>