I'm migrating a project based on the telerik MVC extensions, over to Kendo, and I'm having problems with an edit form.
It's based on a custom object, which uses data annotations for validation, on a couple of decimal fields:-
When a record is inserted, the regular expression validation error message is shown, even though the data entered meets the criteria. The only way to get the form to work is to comment out the regular expression rule. The range validation works fine.
This code worked perfectly using the old MVC extensions grid and pop-up edit form. How can I get this to work using the Kendo grid?
It's based on a custom object, which uses data annotations for validation, on a couple of decimal fields:-
[Required(ErrorMessage =
"Activity Value is required!"
)]
[Range(0, 90000000, ErrorMessage =
"Activity Value Cannot be less than zero!"
)]
[RegularExpression(@
"^\d{1,8}(\.\d{1,4})?$"
, ErrorMessage =
"Please enter a numeric value with up to four decimal places."
)]
public
decimal
Activity {
get
;
set
; }
When a record is inserted, the regular expression validation error message is shown, even though the data entered meets the criteria. The only way to get the form to work is to comment out the regular expression rule. The range validation works fine.
This code worked perfectly using the old MVC extensions grid and pop-up edit form. How can I get this to work using the Kendo grid?