Skip to content

Added validation logic for using steppers

Zhou Fang requested to merge github/fork/linkfang/zhoufang/master/issue304 into master

Fixes issue304 and fixes issue305

Added validation logic for using steppers Improved navigation logic for using steppers

Validation logic for going back:

  • If current step is empty and this is the furthest step user has been to, user can go back
  • If current step is empty and this is NOT the furthest step user has been to, user can go back, and the values on current step will be reset to a previous valid state. (This will prevent the user skips validation on current step)
  • If current step is NOT empty and all the values pass validation, user can go back, and the values will be updated to the database.
  • If current step is NOT empty and fails to pass validation, user will see a confirmation modal window. If choose "Yes", user will go back and loses new changes to that step, values will be roll back to previous valid state. If choose "cancel", user will stay on current step.

Merge request reports

Loading