Re: [QuickForm] My own validation
| From: | bertrand Gugger | Date: | Wed, 08 Dec 2004 14:07:32 +0000 |
| Subject: | Re: [QuickForm] My own validation | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16114@lists.php.net to get a copy of this message | ||
Cédric Fournier wrote:
Hello, I try to add my own script validation on both client-side and server-side. I Made this regular expression : and add with registerRule. $form->registerRule('is_alpha_cr','regex',"/^[a-zA-Z'éèêëàâäùüûôöîïç, -\n]+$/"); Just use simple quotes or \\n if you keep double quotes.Please as said Alexei, don't use an existing thread for a new message ! Bye -- bertrand Gugger (toggg) >My regular expression looking for a string where there'is only letters, >blank and new line (\ n). My problem is that when i'm looking on the source >the newline disappear from my expression and there's a real new line. I had >an extra backslash. It works with Javascript but not with php because of the >extra backslashes. > >Anybody have a solution to validate a text with regular expression ? > > >Thanks. > > >