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

Skip hidden field from validation #1610

Merged
merged 16 commits into from
Oct 4, 2022
Merged

Conversation

maimoonak
Copy link
Collaborator

Fixes #1579

Description
Hidden field does not qualify for any validation. Response validation marks hidden field as valid and passes validation irrespective of it value

Alternative(s) considered
The validation skips the hidden field in when doing questionnaire-reponse validation. The other option could have doing it inside each and every validator but that makes it repetitive, non central, and does not keep room to revert it easily for specific validator types in future.

Type
Choose one: Bug fix

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

Copy link
Contributor

@shoaibmushtaq25 shoaibmushtaq25 left a comment

Choose a reason for hiding this comment

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

Thanks @maimoonak. LGTM. 👍

Copy link
Collaborator

@ellykits ellykits left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jingtang10
Copy link
Collaborator

@maimoonak please use the assignee field to assign PRs to reviewers for a faster turn around

Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

thanks @maimoonak !

@jingtang10 jingtang10 assigned maimoonak and unassigned jingtang10 Sep 30, 2022
@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Merging #1610 (f152264) into master (e4c7b78) will decrease coverage by 0.10%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #1610      +/-   ##
============================================
- Coverage     36.36%   36.26%   -0.11%     
  Complexity      330      330              
============================================
  Files           149      149              
  Lines          4947     4961      +14     
  Branches        879      880       +1     
============================================
  Hits           1799     1799              
- Misses         2910     2922      +12     
- Partials        238      240       +2     
Impacted Files Coverage Δ
...e/validation/QuestionnaireResponseItemValidator.kt 92.30% <0.00%> (-7.70%) ⬇️
...pture/validation/QuestionnaireResponseValidator.kt 0.00% <0.00%> (ø)
...hir/datacapture/MoreQuestionnaireItemComponents.kt 18.48% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

Thanks

@jingtang10 jingtang10 enabled auto-merge (squash) October 3, 2022 22:32
@jingtang10 jingtang10 merged commit f22598f into google:master Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

[Form Validation] Hidden Required fields should not be validated
7 participants