Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Edit: repeat code This commit will extract out repeat code into a new function and call that function from the event handlers. This will improve code readability. * Edit: variable scope This commit will tightly scope variable because it is not referenced anywhere else outside the function. * Refactor: functions for readability and separation of concerns This commit will refactor functions with the goal of being readable for viewers. This commit will also separate functions that check if input is of valid email type and functions that will set the email class name based on that validation. This commit will also set and/or remove error class name based on the value of email validation function. * Refactor: functions for readability and separation of concerns This commit will refactor functions with the goal of being readable for viewers. This commit will also fix validation result when email value length is 0. This commit will also separate functions that check if input is of valid email type and functions that will set the email class name based on that validation. This commit will also set and/or remove error class name based on the value of email validation function. * Fix: email regex and error element attr This commit will change the attribute of error span element from className to id. This commit will also declare the email regex pattern outside the check email validation function. * Edit: formatting whitespace * Edit: formatting suggestion by linter/formatter * Update index.md * Update index.md --------- Co-authored-by: Chris Mills <[email protected]>
- Loading branch information