Page 1 of 1

validation

Posted: Tue Nov 08, 2011 1:58 am
by Lphp
(!preg_match('/[a-zA-Z]/', $_POST['interest']) I would like my validation is letter and space ( in any position) how can I handle that?

Re: validation

Posted: Tue Nov 08, 2011 2:36 am
by Christopher
(!preg_match('/^[a-zA-Z\ ]*$/', $_POST['interest'])

Re: validation

Posted: Thu Nov 10, 2011 4:12 am
by Lphp
on this case all the empty input , I don't want the empty input , I only want a lease one letter , and you can have space between letter
Thankyou