Skip to content

server validation, stop removal of attr holding err msg #186

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

Closed
wants to merge 2 commits into from

Conversation

stevewasiura
Copy link
Contributor

if server side validation does not return a specific message, don't remove the element attribute that holds a validation error message.

this allows the failure of the server side validation to use the err msg specified in the element's attr.
the specification of error messages may be in the domain / control of the web designer / form builder, and not the server side programmer.

furthermore, the data validation error message attr of the active element may need to be used by other validation routines, and if attr is removed, other validation err msgs would appear blank.

if server side validation does not return a specific message, don't remove the element attribute that holds a validation error message.

this allows the failure of the server side validation to use the err msg specified in the element's attr.
the specification of error messages may be in the domain / control of the web designer / form builder, and not the server side programmer.

furthermore, the data validation error message attr of the active element may need to be used by other validation routines, and if attr is removed, other validation err msgs would appear blank.
same as previous edit, don't remove attribute

first time field is validated at the server, server returns null message so newer code using inline err msg. works good.

then when editing input element value, on keyup event, attr holding the inline err msg is removed, and when server returns validation error with no message, the err displayed to user is blank, since the inline err msg has been removed previously.
victorjonsson added a commit that referenced this pull request Dec 28, 2014
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.

2 participants