Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
apih committed Mar 30, 2024
1 parent 1d84563 commit 7db4828
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ There are 2 ways to start using `quival` in your project.
Get the script from [jsDelivr CDN page](https://www.jsdelivr.com/package/npm/quival) and include it in your HTML page.

```html
<script src="https://cdn.jsdelivr.net/npm/quival@0.2.x/dist/quival.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/quival@0.3.x/dist/quival.min.js"></script>
```

Extract `Validator` class from `quival` global variable, and you are good to go.
Expand Down Expand Up @@ -129,14 +129,7 @@ const validator = new Validator(data, rules, customMessages, customAttributes, c
// Perform validation
validator
.validate()
.then(() => {
console.log('Successful!');
})
.catch((errorBag) => {
if (errorBag instanceof Error) {
throw errorBag;
}

.then((errorBag) => {
console.log(errorBag.messages());
});
```
Expand Down Expand Up @@ -190,6 +183,7 @@ The produced error messages for the code snippet above.
The following rules are not implemented and will always pass the validation if used.

- `active_url`
- `can`
- `current_password`
- `exclude`
- `exclude_if`
Expand Down

0 comments on commit 7db4828

Please sign in to comment.