Reputation: 9617
I am trying to add client validation for user registration page in Orchard CMS.
Server-side validation is implemented as following (working well):
if (String.IsNullOrEmpty(userName)) {
ModelState.AddModelError("username", T("You must specify a username."));
validate = false;
}
if (String.IsNullOrEmpty(email)) {
ModelState.AddModelError("email", T("You must specify an email address."));
validate = false;
}
I've added all jQuery related scripts to the view, enabled client validation in web.config:
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
Also I added DataAnnotations to the UserPart class properties and UserCreateViewModel class properties.
No luck.
So the questions are:
Upvotes: 2
Views: 1407
Reputation: 3503
I think you have to implement them yourself according to a brief scan of this thread. http://orchard.codeplex.com/discussions/243523
Upvotes: 1