@@ -31,7 +31,7 @@ from declarative rules.
3131- aliases for reusing common rules
3232- can prefill the form with given model
3333- can set default field values (useful in form reset)
34- - support for UI frameworks (Vuetify, Primevue , BootstrapVue, and more)
34+ - support for UI frameworks (Vuetify, PrimeVue , BootstrapVue, and more)
3535- shows error messages (compatible with Laravel API)
3636- shows success messages
3737- validates fields when user enters input
@@ -251,6 +251,7 @@ use a string notation that consists of the following rules:
251251
252252- The string is made of attributes separated by the symbol ` | ` .
253253- There are four attribute types:
254+
2542551 . The first attribute type has the format ` key:value ` .
2552562 . The second attribute has the format ` key=value ` .
2562573 . The third attribute type is syntax sugar for the first type and has the
@@ -279,7 +280,7 @@ textarea element if the component does not declare a prop called `red`.
279280
280281#### Third type
281282
282- The third attribute type supports the following values:
283+ The third attribute type supports the following values:
283284
284285- ** input types** : ` color ` , ` date ` , ` datetime ` , ` datetime-local ` , ` email ` ,
285286` month ` , ` number ` , ` password ` , ` range ` , ` tel ` , ` text ` , ` time ` , ` url ` , ` week ` .
@@ -368,7 +369,7 @@ Aliases are available to all instances of `VueFormBuilder`. The facade to handle
368369aliases is ` fieldAliases ` :
369370
370371``` javascript
371- import fieldAliases from ' @uwlajs/vue-form-builder'
372+ import { fieldAliases } from ' @uwlajs/vue-form-builder'
372373```
373374
374375The ` fieldAliases ` provides the following methods
@@ -413,16 +414,16 @@ Example:
413414<!-- vuetify provider -->
414415<vue-form-builder :fields="fields" provider="vuetify" />
415416
416- <!-- primevue provider -->
417- <vue-form-builder :fields="fields" provider="vuetify " />
417+ <!-- PrimeVue provider -->
418+ <vue-form-builder :fields="fields" provider="primevue " />
418419```
419420
420- Currently, there is partial support for ` Primevue ` and ` Vuetify ` . That is
421+ Currently, there is partial support for ` PrimeVue ` and ` Vuetify ` . That is
421422because some of their form components are not compatible with the API expected
422423by ` VueFormBuilder ` .
423424
424425One solution is for the developer to implement the * Adapter Pattern* : write Vue
425- components that wrap ` Primevue ` or ` Vuetify ` form components and, at the same
426+ components that wrap ` PrimeVue ` or ` Vuetify ` form components and, at the same
426427time, expose an API compatible with ` VueFormBuilder ` :
427428
428429``` vue
@@ -830,6 +831,8 @@ export default {
830831 </script >
831832```
832833
834+ The errors format is compatible with Laravel's API for form errors.
835+
833836#### Message
834837
835838The ` messages ` is an object mapping a field name to a string. Example:
@@ -922,7 +925,7 @@ do anything because the input value is valid. If the validation rule returns
922925` false ` , it will show the error message for that field, specified by the
923926` errors ` property. If the validation rule returns a string, that string will be
924927show as error. If no validation rule exists, nothing will be done.
925-
928+
926929#### Validation on submit
927930
928931If set to ` true ` , whenever user submits the form, the validation rules for all
@@ -971,7 +974,7 @@ export default {
971974 </script >
972975```
973976
974- If the payload contains a ` File ` or ` Bob ` , then the payload won't be ` Object ` :
977+ If the payload contains a ` File ` or ` Blob ` , then the payload won't be ` Object ` :
975978it will be an instance of ` FormData ` . This is useful because in order to upload
976979files via AJAX you need to convert the JS Object into the ` FormData ` format.
977980` VueFormBuilder ` will automatically do it for you.
@@ -999,4 +1002,3 @@ Contributions are welcome. Fork the repo, then make a PR.
9991002## LICENSE
10001003
10011004MIT
1002-
0 commit comments