Hi,
In my form I have many buttons to make some stuff, but only one submit the form. By now the JS validation work only when the form is submitted, I want to add the same (effect/style) of the default js validation also when the other buttons are clicked for ex:
Thanks
In my form I have many buttons to make some stuff, but only one submit the form. By now the JS validation work only when the form is submitted, I want to add the same (effect/style) of the default js validation also when the other buttons are clicked for ex:
$('#my-button').click(function() {
if ($('#my-input').val() == ' ') {
//use the JS validation 'input can't ne empty'
}
})
Thanks