public void preValidate ( String text ) throws DataValidationException { // size Trace . g . std . note ( Validator . class , "preValidate: size = " + _size ) ; if ( _size > 0 && text . length ( ) > _size ) { throw new DataValidationException ( "SIZE" , _name , text ) ; } // pattern Trace . g . std . note ( Validator . class , "preValidate: pattern = " + _pattern ) ; if ( _pattern != null && ! _pattern . matcher ( text ) . matches ( ) ) { throw new DataValidationException ( "PATTERN" , _name , text ) ; } }
Performs all data validation that is based on the string representation of the value before it is converted .