0

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!

skaffman
  • 390,936
  • 96
  • 800
  • 764
REALSOFO
  • 800
  • 7
  • 32
  • well space and minus are UTF-8 characters so by definition you just want any string that doesn't start or end with a space or minus?!? – Doug T. May 18 '10 at 15:52

1 Answers1

0

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()

Community
  • 1
  • 1
Thomas Winsnes
  • 1,931
  • 1
  • 13
  • 15