-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
What problem does this feature solve?
For enum props, it's common to validate the given value against valid enum values like this:
props: {
position: {
type: String,
validator (val) {
return ['top', 'right', 'bottom', 'left'].includes(val)
}
}
}
What does the proposed API look like?
I think it'll be handy to provide extra convenience by supporting this:
props: {
position: {
type: String,
validator: ['top', 'right', 'bottom', 'left']
}
}
skyline0705, sanchitnevgi, NotIntMan, imageslr, RafaelGSS and 14 moresirlancelot, IsTheJack, qiangbro, kaorun343, techpool and 4 morecodeams and techpoolteazean, skyline0705, Jinjiang, vovchisko and DoveAz
Metadata
Metadata
Assignees
Labels
No labels