JSFiddle - React, Tailwind, and code Playground
by Trisox
HTML
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
prevent using of ' / and "
<form class="cmxform" id="something" method="get" action="">
<input type="text" name="wachtwoord" value=""/>
<br/>
<input type="submit"/>
</form>
CSS
#something { width: 500px; }
#something label { width: 250px; }
#something label.error, #something input.submit {padding:5px; }
JavaScript
$(document).ready(function() {
$.validator.addMethod("wachtwoord", function(value, element) {
return this.optional(element) || /^[^//"]$/i.test(value);
});
// Validate signup form
$("#something").validate({
rules: {
wachtwoord: "required wachtwoord"
},
messages: {
wachtwoord: "Oeps gaat iets fout!"
},
});
});