public static Constraint email ( ) { return new Constraint ( "email" , simplePayload ( "email" ) ) { public boolean isValid ( Object actualValue ) { if ( actualValue != null ) { if ( ! ( actualValue instanceof String ) || ! Utils . isValidEmail ( ( String ) actualValue ) ) { return false ; } } return true ; } } ; }
The email constraint - field must contain a valid email .