agdar/static/plugins/parsleyjs/UPGRADE-2.1.md
2025-11-02 14:35:35 +03:00

544 B

UPGRADE FROM 2.0.x to 2.1.0

General

2.1.0 version introduced some minor BC Breaks. Here is the list:

isValid() field methods returns boolean. If you had a test case like this:

if ('object' === typeof $('#field').parsley().isValid() && !$('#field').parsley().isValid().length) {
    // field is optional and empty, nor valid, nor invalid
}

becomes

if ($('#field').parsley().isValid() && !$('#field').parsley().needsValidation()) {
    // field is optional and empty, nor valid, nor invalid
}