@@ -604,7 +604,7 @@ All components in a Form inherit their `size` attribute from that Form. Similarl
...
@@ -604,7 +604,7 @@ All components in a Form inherit their `size` attribute from that Form. Similarl
| Method | Description | Parameters |
| Method | Description | Parameters |
| ---- | ---- | ---- |
| ---- | ---- | ---- |
| validate | validate the whole form. Takes a callback as a param. After validation, the callback will be executed with two params: a boolean indicating if the validation has passed, and an object containing all fields that fail the validation. Returns a promise if callback is omitted | Function(callback: Function(boolean, object)) |
| validate | validate the whole form. Takes a callback as a param. After validation, the callback will be executed with two params: a boolean indicating if the validation has passed, and an object containing all fields that fail the validation. Returns a promise if callback is omitted | Function(callback: Function(boolean, object)) |
| validateField | validate one or serveral form items | Function(props: string | array, callback: Function(errorMessage: string)) |
| validateField | validate one or several form items | Function(props: string | array, callback: Function(errorMessage: string)) |
| resetFields | reset all the fields and remove validation result | — |
| resetFields | reset all the fields and remove validation result | — |
| clearValidate | clear validation message for certain fields. The parameter is prop name or an array of prop names of the form items whose validation messages will be removed. When omitted, all fields' validation messages will be cleared | Function(props: string | array) |
| clearValidate | clear validation message for certain fields. The parameter is prop name or an array of prop names of the form items whose validation messages will be removed. When omitted, all fields' validation messages will be cleared | Function(props: string | array) |
@@ -381,7 +381,7 @@ Cet exemple montre comment vous pouvez personnaliser vos règles de validation p
...
@@ -381,7 +381,7 @@ Cet exemple montre comment vous pouvez personnaliser vos règles de validation p
```
```
:::
:::
### DAjouter ou supprimer des champs dynamiquement
### Ajouter ou supprimer des champs dynamiquement
:::demo En plus de pouvoir passer toutes les règles de validation en une seule fois au formulaire, vous pouvez aussi ajouter ou supprimer des règles sur un seul champ de manière dynamique.
:::demo En plus de pouvoir passer toutes les règles de validation en une seule fois au formulaire, vous pouvez aussi ajouter ou supprimer des règles sur un seul champ de manière dynamique.
Input is a controlled component, it **always shows Vue binding value**.
Input est un composant controllé, il **affiche toujours la valeur liée de Vue**.
Under normal circumstances, `input` event should be handled. Its handler should update component's binding value (or use `v-model`). Otherwise, input box's value will not change.
En règle générale, l'évènement `input` devrait être géré. Son handler devrait mettre à jour la valeur du composant (ou utilisez `v-model`). Dans le cas contraire, la valeur du champ ne sera pas modifiée.
Do not support `v-model` modifiers.
Les modificateurs de `v-model` ne sont pas supportés.
:::
:::
### Usage
### Usage
...
@@ -75,12 +75,12 @@ export default {
...
@@ -75,12 +75,12 @@ export default {
```
```
:::
:::
### Password box
### Champ de mot de passe
:::demo Make a toggleable password Input with the `show-password` attribute.
:::demo Créez un champ de mot de passe avec icône de visualisation grâce à l'attribut `show-password`.