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";
}
'개발자공부 > JavaJsp' 카테고리의 다른 글
ajax 뒤로가기 제어하기 (0) | 2016.10.31 |
---|---|
AJAX return find 방법, 에러 대응 (0) | 2015.12.09 |