Error messages in umbraco.... Options
tarhonc
Posted: Wednesday, March 12, 2008 4:24:01 PM
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
mortenbock
Posted: Wednesday, March 12, 2008 9:21:02 PM

Rank: Addict

Joined: 7/19/2006
Posts: 752
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.

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

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.