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

Refactor validators to seperate isApplicable and validate logic #312

Open
LaChope opened this issue Apr 5, 2024 · 0 comments
Open

Refactor validators to seperate isApplicable and validate logic #312

LaChope opened this issue Apr 5, 2024 · 0 comments
Assignees

Comments

@LaChope
Copy link
Collaborator

LaChope commented Apr 5, 2024

Validator should be object having two methods:

isApplicable(question)
validate(question, intl)

The goal is also to remove method FormUtils.hasValidationLogic() whose logic should be implemented rather in separate validators -- i.e. each validator should know when it isApplicable(question).

A/C:

  • FormUtils.hasValidationLogic() is removed
  • each validator is an object with mentioned methods
@LaChope LaChope self-assigned this Apr 5, 2024
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

No branches or pull requests

1 participant