Survey Form-Validation Errors

Survey Form-Validation Errors
0

How can I make it so there’s a validation error if anyone puts anything other than numbers in a text box?
Also, what about emails?According to the tests, if an email is not “formatted correctly”,there should be a validation error, but I have no idea how to put it together.

hi kejdi
i guess you use input element in your form.
so modify the value of the “type” attribute and you’ll get what you want.

that’s what i do, and it works. it does create fields for numbers and email, but i can’t make it display an error IF the person types something other than what’s required.aka i wrote “type=email”, but if i write something that’s not formatted like an email, it doesn’t show an error.

Please provide a link to your codepen. It makes debugging easier if we can see what you’ve done.