angularjs provides basic form verification, such as attributes such as ng-minlength
, and then you can use form.inputname.$valid
to determine whether the verification has passed
But how to verify a multi-select box like checkbox
? To verify that at least one is selected, is there any built-in method? I feel like it shouldn’t be too complicated to write, right?
I came up with the method myself, see the blog: angularjs form verification checkbox
ngRequired
is too long, just bind a function to return boolean.