+ public static String emptyPolicyValidatorWithSpaceAllowed(String field){
+ String error;
+ if ("".equals(field) || !field.matches("^[a-zA-Z0-9_ ]*$")) {
+ error = "The Value in Required Field will allow only '{0-9}, {a-z}, {A-Z}, _' following set of Combinations";
+ return error;
+ } else {
+ if(CharMatcher.ASCII.matchesAllOf((CharSequence) field)){
+ error = SUCCESS;
+ }else{
+ error = "The Value Contains Non ASCII Characters";
+ return error;
+ }
+ }
+ return error;
+ }