Closed ghost closed 11 years ago
@Guite that is for Sf1
That link uses BTW http://jqueryvalidation.org Demos here http://jquery.bassistance.de/validate/demo/
You can use built-in validation:
// validate the comment form when it is submitted
$("#commentForm").validate();
...
<form class="cmxform" id="commentForm" method="get" action="">
...
<input id="cemail" type="email" name="email" required />
or do it via a JS
// validate signup form on keyup and submit
$("#signupForm").validate({
rules: {
firstname: "required",
lastname: "required",
username: {
required: true,
minlength: 2
},
password: {
required: true,
minlength: 5
},
confirm_password: {
required: true,
minlength: 5,
equalTo: "#password"
},
...
There is also this: https://github.com/Abhoryo/APYJsFormValidationBundle I'm sure if you tweet @lsmith
, @fabpot
and @webmozart
#symfony you will get lots of feedback on solutions.
I found parsley.js as a validation plugin. It works pretty well as far as I tested.
Nice. In Formicula I've used HTML5 validation together with webshims lib polyfill (html5 fallback) for older browsers. Works quite nicely as well.
Remove Prototype/Scriptaculous and refactor all code to jQuery 1.7 + UI