You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/guide/validation.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ export default {
142
142
Fortunately there is already a very neat way to build validation schemas for your forms by using `yup`, it allows you create validation objects like this:
143
143
144
144
```js
145
-
constschema=yup.object().shape({
145
+
constschema=yup.object({
146
146
email:yup.string().required().email(),
147
147
name:yup.string().required(),
148
148
password:yup.string().required().min(8),
@@ -174,7 +174,7 @@ export default {
174
174
Field,
175
175
},
176
176
data() {
177
-
const schema = yup.object().shape({
177
+
const schema = yup.object({
178
178
email: yup.string().required().email(),
179
179
password: yup.string().required().min(8),
180
180
});
@@ -398,7 +398,7 @@ You can do this in two ways depending on which validators you are using (yup or
398
398
With yup it is very straightforward, you just need to call `label()` after defining your field's validations either in field level or form level:
0 commit comments