HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/node_modules/parsleyjs/UPGRADE-2.1.md
# 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:

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

becomes

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