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

Fixed form validation to JT survey minimum & maximum values #4509

Merged
merged 1 commit into from
Aug 19, 2019
Merged

Fixed form validation to JT survey minimum & maximum values #4509

merged 1 commit into from
Aug 19, 2019

Conversation

saito-hideki
Copy link
Member

@saito-hideki saito-hideki commented Aug 19, 2019

SUMMARY

Fixed form validation logic to JT survey(ANSWER_TYPE: Text, Textarea, and Password) minimum & maximum values to be able to handle null value properly.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • UI
AWX VERSION
  • AWX: devel
  • Ansible Tower: 3.4, 3.5
ADDITIONAL INFORMATION
  • None

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@saito-hideki saito-hideki changed the title [WIP] Fixed form validation to JT survey minimum & maximum values Fixed form validation to JT survey minimum & maximum values Aug 19, 2019
@jakemcdermott jakemcdermott self-requested a review August 19, 2019 12:48
Copy link
Contributor

@jakemcdermott jakemcdermott left a comment

Choose a reason for hiding this comment

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

"" (empty string) can occur after clearing the field, while null occurs as a default for undefined fields when loading an existing survey.

Both states are presented identically but were handled differently by the validators. Since empty strings are already being excluded from the min / max validation checks, I think updating these validators to also exclude null is reasonable. 👍

This looks good to me, thanks @saito-hideki

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 2cdd007 into ansible:devel Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants