Rank: Newbie
Joined: 3/12/2008 Posts: 1
|
Hi i'm new in wmbraco world...and i have a question for big guys.
I create an umbraco action handler to test for example the length of property. i throw an exception but nothing happens.
Now the behavior is very strange. So i can manage what must to save ...but the user don't know the reason for that a fields is not save in db.My goal is to inform the user that his enter an wrong value with a friendly mesage .i want to open an pop-up in umbraco with an corresponding message for example.
I know that we have an validation fields on document type but if io put there an regular expresion....i have an messages like that..."the parameter has wrong value."
I want something like that ...PropName must have between 2-20 charecters. if is possible.
thank you
|
 Rank: Addict
Joined: 7/19/2006 Posts: 734 Location: Århus, Denmark
|
The action handler is not designed for that sort of usage. What you should do instead is to use the "Validation" field when you add a property to your document type. In that field you can enter a Regular Expression, and umbraco will validate the entered value for you.
|