Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugBash] Prevent added model errors from being reset by JQuery Validate #5502

Merged
merged 7 commits into from
Feb 23, 2018

Conversation

scottbommarito
Copy link
Contributor

#5454

Basically, by putting the errors on string.Empty instead of AdminUsername, they are not erased by JQuery Validate when it checks the input.

Also fixed this in the ForgotPassword form because it was easy to do so.

@@ -45,6 +45,9 @@
@Html.ShowTextBoxFor(m => m.AdminUsername)
@Html.ShowValidationMessagesFor(m => m.AdminUsername)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're using string.Empty, should we remove ShowValidationMessagesFor(m => m.AdminUsername), Email, etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because those will show errors with AdminUsername not specified by us (e..g. if the field is empty).

@scottbommarito scottbommarito merged commit 7a86e82 into dev Feb 23, 2018
@scottbommarito scottbommarito deleted the sb-transformerrors branch February 23, 2018 00:07
@scottbommarito scottbommarito restored the sb-transformerrors branch July 22, 2019 23:20
@scottbommarito scottbommarito deleted the sb-transformerrors branch July 22, 2019 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants