String function ( Object arg0 ) { if ( ! ( ( String ) arg0 ) . matches ( regexp ) ) { return con . stringBasicValidationError ( ) + "srini_string" + regexp ; } return "srini_string" ; }
validator just allows a-z a-z 0-9 and - and _ . validation will run against string object so make sure to use a proper object . concode_field_sep AssetPageConstants con concode_elem_sep String regexp concode_field_sep placeholderType placeHolder