In a function I defined a SQLFORM.factory form:

form=SQLFORM.factory(Field(...)),
    Field('areacode',requires=[IS_LENGTH(2),IS_NOT_EMPTY()])


The IS_LENGTH(2) validator validates areacodes that have a length of 1
or 2 characters, whereas an areacode have a length of 2 characters. Is
there a way to validate areacode to have exactly a length of 2.


Kind regards,

Annet

Reply via email to