I’m working on the Build a Survey Form project and want to know if there is a way to validate an email using CSS.
Can it be done with CSS? Same question for the validation of numbers.
Any input would be very helpful.
You can’t validate emails with css but you can with html.
Give your input box type of email then it will automatically validate for you.
You can write own rules to validate the field with patern=""
https://www.html5-tutorial.net/form-validation/validating-email/#aelm4759 An example.
you can use html5 to validate some inputs, for exmple if you want to make an input required you can use the required attribute
<input type="text" required>
you can find more information and examples in this article
Thanks! I had my input box type set to “text” not “email”. It’s those little nuances that can drive you crazy. lol
Now I’ve only got one more error to try and fix before this project passes all the tests.