Please help me with a function that validate an input string to allow:
1) UTF-8 characters (ex: şţăîâ) ; 2) space ; 3) minus symbol(-)
String cannot start or end with space or minus.
Thanks!
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.
You will need to use multibyte string functions
http://au.php.net/manual/en/function.mb-internal-encoding.php
UTF-8 validation in PHP without using preg_match()