I’m creating an onboarding wizard and at each next button I need to validate the users input. For instance when they enter their email address.
I saw @nolimits4web had suggested this on another thread:
app.input.validateInputs('#companyform'); var valid = $('#email .input-invalid').length === 0
What I’m guessing is that app.input.validate() validates a specific input (in this case the entire form) and then var valid is looking to see if it passed the validation? Is that correct?
What goes after the === 0 as there’s no semi colon, it’s not a ternary so I’ve no clue what’s going on.
Also, how can you force a field to be invalid and provide your own message (i.e. “That email address is not available.”)?