I'm using the jQuery Validation plugin and want to disable the or element/container it creates to display the error 'message'.
Basically, I want the input element with the error to have the error class but NOT create an additional element containing the error message.
Is this possible?
I have just thought of a CSS workaround, but it doesn't really fix the fact that the element is still being created?
<style> label.simpleValidationError {display: none !important; } </style>
Use the Validator errorPlacement option with an empty function:
$("selector").validate({ errorPlacement: function(error, element) {} });
This effectively places the error messages nowhere.
You can also use this code:
jQuery.validator.messages.required = ""; $("selector").validate();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With