How do I use validation? Options
tkahn
Posted: Wednesday, November 21, 2007 2:45:50 PM

Rank: Fanatic

Joined: 11/24/2006
Posts: 323
Location: Stockholm, Sweden
I don't understand how the "Validation" field that I see when I create a document type works? I can't find any documentation and no entries in the forum. Is it regular expressions or something else?

Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
drobar
Posted: Wednesday, November 21, 2007 3:27:28 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,831
Location: MA, USA
Hi, Thomas,

Yes, regex for the validation. I know that AutoForm and AutoFormPlus pick it up for client and server-side validation of form inputs. I don't know if it is used anywhere else.

Ismail had an interesting note about long regex strings at http://ismail.umbraco.net/2007/6/26/reg-ex-validation-tip.aspx

He also suggested that http://regexlib.com/default.aspx is a good place to find useful regex's.

cheers,
doug.

MVP 2007-2009 - Percipient Studios
tkahn
Posted: Thursday, November 22, 2007 9:07:25 PM

Rank: Fanatic

Joined: 11/24/2006
Posts: 323
Location: Stockholm, Sweden
Hi Doug!

Thanks for posting so many good answers!

So do I just enter a regular expression or does it have to be encapsulated in parenthesis' or formatted in some special way? And this renders an error message in the admin interface if the user tries to enter a value that doesn't pass the regExp check, in the same fashion as when you define a field as being mandatory?

Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.