How can select that when all elements in form tag textarea select and input are all filled?


With .is(’:valid()’); how can select in a form is valid all data? And then enable button with .prop? Any idea?


Are you trying to use jQuery validator?

Well i prefer front end validation but this way may be I drop this idea.

jQuery validator IS front-end validation. But, if you aren’t using that, where are you finding .is(':valid()'); ?

.is select same like :valid with pure css3. So its works in only one input field but not know how to seperate it… Like 5 inputs with custom pattern

Well, the logic goes like this:

  • initially, you have a variable, call it isValid, that is false. Also, the submit button has a disabled attribute.
  • As each form element is touched (whether focus, or blur, or change), ALL form elements are validated.
  • If ALL form elements pass some basic validation, then the isValid can be set to true.
  • if isValid is true, then the submit button disabled attribute is removed.

that’s the logic. As to code…