Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi everyone, how do you overwrite the RegisterModel
The validation of the email address is a regular expression which does not allow to use email addresses with capital letters.
I need to override this just not sure how to do it, any help or pointers much appreciated.
Code
[Required] [RegularExpression("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", ErrorMessage = "Please enter a valid e-mail address")] public string Email { get; set; }
I would also like to know how to do this.. Did you manage to solve it?
Just use Email Address attribute of Dot net it just work everything for uh regarding email
I managed to override the client side validation. However it then throws it back with the server side validation.
For example you can even do it by amending Umbraco's own regular expression:
@Html.TextBoxFor(m => registerModel.Email, new { @class = "form-control", @data_val_required = "This field is required.", @data_val = "true", @data_val_regex = "Please enter a valid email address", @data_val_regex_pattern = @"^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$" })
But as I said, when you click submit it comes back with the same error message.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
RegisterModel, ProfileModel email validation
Hi everyone, how do you overwrite the RegisterModel
The validation of the email address is a regular expression which does not allow to use email addresses with capital letters.
I need to override this just not sure how to do it, any help or pointers much appreciated.
Code
I would also like to know how to do this.. Did you manage to solve it?
Just use Email Address attribute of Dot net it just work everything for uh regarding email
I managed to override the client side validation. However it then throws it back with the server side validation.
For example you can even do it by amending Umbraco's own regular expression:
But as I said, when you click submit it comes back with the same error message.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.