#NgForm is showing valid even though required fields are not selected

8 messages · Page 1 of 1 (latest)

night acorn
#

If I don't choose any fields in my form, and click submit, the form is invalid, which is expected. But if I provide one field that is required, and leave all the other required ones alone, the form is shown as valid. Why is this? Code is attached.

spare drift
night acorn
spare drift
night acorn
spare drift
#

Oh you're using template driven forms. I'm not familiar with them. Do all the required fields validate or only the ones in the arrays?

#

Also is it possible that it is allowing an empty string?

night acorn
#

when leaving all fields empty, the form is (correctly) invalid: