Chào mọi người
Em có bài toán là: validate các trường nhập dấu tiếng việt sẽ bị lỗi thì mình nên dùng cách nào để biết được người dùng nhập tiếng việt ạ
Em cảm ơn
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Em sử dụng regex này xem sao:
[0-9a-zA-Z]+
Ví dụ:
System.out.println(“Dung”.matches(“[0-9a-zA-Z]+”));// true trường hợp này chr check được 1 từ anh à từ 2 từ sẽ false System.out.println(“Dung nam”.matches(“[0-9a-zA-Z]+”)); // false
Vậy em dùng pattern này em ạ:
System.out.println("Dung Name".matches("[0-9a-zA-Z\\s]+")); // true
Anh ơi trường hợp mà mình xuất File mà bị lỗi Font thì mình sử lí ra sao vậy ạ