validators are filters and executed in order. If IS_MATH is preceded
by IS_UPPER, Sophie probably wants:
IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$')

Massimo

On Oct 13, 10:08 pm, Jonathan Lundell <[email protected]> wrote:
> On Oct 13, 2009, at 7:59 PM, DenesL wrote:
>
>
>
> > Hi Sophie,
>
> > you want IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$',...) and you can drop
> > IS_NOT_EMPTY(...).
> > The regex above means: match a string composed only of the characters
> > listed from beginning to end with minimum length=1.
> > Yours said: match a substring anywhere in the string that has zero or
> > more chars in a-zA-Z followed by zero or more blanks followed by...
>
> I was wondering whether it might be IS_MATCH('^[A-Z ÁÉÍÓÚ]+$',...)
>
> That is, does IS_MATCH() get the original contents, or the return  
> value of IS_UPPER()?
>
>
>
> > I recommend:http://weitz.de/regex-coach/
>
> > Denes
>
> > On 13 oct, 18:18, Sophie <[email protected]> wrote:
> >> Whats wrong with this code?
>
> >> db.Person.nPerson.requires=IS_NOT_EMPTY('You should insert a
> >> name'),IS_UPPER(),IS_MATCH('([a-zA-Z]*[ ]*[áÁ]*[éÉ]*[íÍ]*[óÓ]*[úÚ]*)
> >> +',error_message='Only insert a-z A-Z áÁ éÉ íÍ óÓ úÚ and
> >> spaces'),IS_NOT_IN_DB(db, 'Person.nPerson','This person is in the
> >> database')
>
> >> When i insert 123 it should appear the error message but it insert
> >> this value in the databse, when i verify it appears empty. What i am
> >> doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to