Syntax reference on validator types, e.g. rangelength

A place for users and developers of the Xataface to discuss and receive support.

Syntax reference on validator types, e.g. rangelength

Postby marksawers » Wed Apr 16, 2008 1:20 pm

I haven't been able to find reference material on the syntax for all validation types. For example, how do I use the rangelength? I tried validators:rangelength = 1,100 and 1-100 but neither works.

Thanks!
marksawers
 
Posts: 7
Joined: Wed Apr 16, 2008 1:09 pm
Location: Fairfield, CT

Postby shannah » Wed Apr 16, 2008 2:05 pm

Try putting it in quotes (comma separated):

Code: Select all
validators:rangelength = "1,100"
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Syntax reference on validator types, e.g. rangelength

Postby marksawers » Wed Apr 16, 2008 2:16 pm

Quotes didn't work. Tried this:

Code: Select all
validators:rangelength="1,100"
validators:rangelength:message="Class must be between 1 and 100"
marksawers
 
Posts: 7
Joined: Wed Apr 16, 2008 1:09 pm
Location: Fairfield, CT

Postby shannah » Wed Apr 16, 2008 2:30 pm

Not sure why its not working.

You can achieve the same thing using the regex validator:

Code: Select all
validators:regex = "/^.{1,1000}$/"
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved