JAVA paramMap 특수문자 검사
public boolean chkSpecStr(String str){
if(str.matches("[0-9|a-z|A-Z|ㄱ-ㅎ|ㅏ-ㅣ|가-힝]*")){
return true;
}else{
return false;
}
}
public String chkParamMap(Map<String, String> paramMap){
Set<Entry<String, String>> set = paramMap.entrySet();
Iterator<Entry<String, String>> it = set.iterator();
while(it.hasNext()){
Map.Entry<String, String> e = (Map.Entry<String, String>)it.next();
System.out.println("키값= "+e.getKey()+ " value= "+e.getValue());
if(!e.getKey().equals("email")||!e.getKey().equals("pwd")||!e.getKey().equals("phone")){
if(!chkSpecStr(e.getValue())){
System.out.println("chkSpecStr(e.getValue())==="+chkSpecStr(e.getValue()));
return e.getKey();
}
}
}
return "PASS";
}