

JavaScript to set the hidden field's value to a base64 encoded signature. I made a hidden field with a custom validation to handle this. Is there a way to have a function trigger at the same time other validation happens-not after? How can I stop the form from submitting unless both my conditions are met-not just the jquery validation? and only continue on to actually submit the form if both the jquery validation and the signature are satisfied. $( "#signature-pad" ).append( "A signature is required" ) Ideally, there would be a way to add a function like this that happens concurrently with any validation: var errorExists = false I can check if the signature exists with "signaturePad.isEmpty()". I can add methods to jquery validator, but I'm pretty sure those only work on validating the content of inputs-not a canvas.


Unfortunately, adding a function to the jquery validation submithandler to check if the canvas has a signature is not sufficient because this only triggers once all other required fields are satisfied. I want to validate if something is drawn on the html canvas (signature pad) at the same time all the other input fields are validated. Reserve a path element inside the container svg. Basic workflow: Create a functionally blank svg to contain the signature. I'm using to validate multiple fields in my form along with smizek's signature_pad. This post tries to explain how exactly his solution works.
