November Happy Hour will be moved to Thursday December 5th.

Make int property non-negative

Vote:
 

Is there any way to stop a user from making a int property non-negative in EPiServer?

There is a tool for visitorGroups (DojoWidget) that can constraints the input field to not go lower than a specified value. This tool does however not work with a regular EPiServer property.

The range attribute can fix so user can't save if he inputs a value lower than what's specified, but I want to find a way to stop the user before this.

#76633
Oct 30, 2013 10:09
Vote:
 

Just add custom validation to the property using the validation attributes: http://www.david-tec.com/2012/06/EPiServer-7-Preview---Using-validation-attributes/.

Frederik

#76653
Oct 30, 2013 15:13
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.