fix(alpha): number field with hasMany accept defaultValue array (#5619)
This commit is contained in:
committed by
GitHub
parent
777a661389
commit
4ee4ad25b0
@@ -112,7 +112,13 @@ export const number = baseField.keys({
|
||||
placeholder: joi.string(),
|
||||
step: joi.number(),
|
||||
}),
|
||||
defaultValue: joi.alternatives().try(joi.number(), joi.func()),
|
||||
defaultValue: joi
|
||||
.alternatives()
|
||||
.try(
|
||||
joi.number(),
|
||||
joi.func(),
|
||||
joi.array().when('hasMany', { not: true, then: joi.forbidden() }),
|
||||
),
|
||||
hasMany: joi.boolean().default(false),
|
||||
max: joi.number(),
|
||||
maxRows: joi.number().when('hasMany', { is: joi.not(true), then: joi.forbidden() }),
|
||||
|
||||
Reference in New Issue
Block a user