conr-g / waiting-room

1 stars 1 forks source link

Write field validation structure #63

Closed vijar50 closed 5 years ago

vijar50 commented 5 years ago

Text Field Component has onChange property which calls a function and helperText, which points to a string in the state.

  1. onChange event - call validation function
  2. function will call a dispatch function to the middleware actions
  3. action will then lookup the right reducer and store the variable in the redux store
  4. validation function will go through conditions. If it fails, update state helperText.
  5. helperText is updated underneath the text field.
vijar50 commented 5 years ago

https://github.com/conr-g/waiting-room/pull/64