zikula / core

Zikula Core Framework
GNU Lesser General Public License v3.0
238 stars 66 forks source link

Refactor to jQuery #334

Closed ghost closed 11 years ago

ghost commented 12 years ago

Remove Prototype/Scriptaculous and refactor all code to jQuery 1.7 + UI

ghost commented 11 years ago

@Guite that is for Sf1

espaan commented 11 years ago

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"
            },
...
ghost commented 11 years ago

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.

cmfcmf commented 10 years ago

I found parsley.js as a validation plugin. It works pretty well as far as I tested.

espaan commented 10 years ago

Nice. In Formicula I've used HTML5 validation together with webshims lib polyfill (html5 fallback) for older browsers. Works quite nicely as well.