@ngugimuchangi
Posted
Hey Zubair.
Great work on the application.
I have a few suggestions that might help you with validation:
- Check out the JustValidate library, it helps work on input validation in a much easier and more organized way.
- Also HTML offers pattern matching and other input attributes such as min, max, and required. You can use
checkValidity()
instance method of HTML input elements to check if the input fields, and CSS pseudoselectors such as:invalid
and:valid
to adjust styling for input fields based on validity.
JustValidate is an easier route. I hope this helps. Cheers!
Marked as helpful
@atmahana
Posted
@ngugimuchangi Hey Duncan, thank you for the great suggestions.
I did insisted myself from using any library for this particular challenge because I want to challenge my JavaScript skill.
And as per your suggestions, it is indeed better to use library for more organized code. Hence, I will make sure to look into the library in improving my form validation and overall code.
Cheers!