I think your regular expression is only matching a single character. 
Instead, try:

^[a-z]+  # the + says to match one or more characters.

You might want ^[a-zA-Z]+ to match upper or lower case.

Anthony


On Wednesday, October 12, 2011 4:41:00 AM UTC-4, Saurabh S wrote:
>
> hi i am developing a system in which i require a validation on name 
> field...validation shoould be : the field should not accept 
> numbers ...it should only accept alphabets...i know this is possible 
> using IS_MATCH in web2py...i tried using 
> db.organisations.name.requires=[IS_MATCH('^[a-z]', 
> error_message='This 
> is not a valid name')] 
> but it is not working 
>  please help me out..... 
>

Reply via email to