kbss-cvut/s-forms

Refactor validators to seperate isApplicable and validate logic

Opened this issue · 0 comments

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