Hi,
I stuck in a problem, which check the string only accept alphabet and white space only.
I try
if (!eregi("^[[:alpha:]]{1,}$",$this->_thisValue)) {
but string like ''abc def' will return in false. Any idea? I want to accept string like 'abc dfds sdfsd'. 😕
Thanks
after spending an hour to find the solution, finally i got this with preg_match() :
if (!preg_match("/^[a-zA-Z.\s]{1,}$/",$this->_thisValue)) {
with a simple \s , it does solve all my problem! Bravo. 🆒