vtils

Home > validator > yup > MixedSchema

yup.MixedSchema interface

Signature:

export interface MixedSchema<T = any> 

Properties

Property Modifiers Type Description
__isYupSchema__   true  
type   ‘mixed’ | ‘string’ | ‘number’ | ‘boolean’ | ‘object’ | ‘date’ | ‘array’  

Methods

Method Description
allowEmptyString()  
cast(value, options)  
clone()  
concat(schema) @类型不友好
default(value)  
default()  
defined()  
describe()  
enum(arrayOfValues, message) oneOf 的别名
equals(arrayOfValues, message) oneOf 的别名
isType(value)  
isValid(value, options)  
isValidSync(value, options)  
label(label)  
meta(meta)  
notOneOf(arrayOfValues, message)  
notRequired()  
nullable(isNullable)  
oneOf(arrayOfValues, message)  
required(message)  
strict(isStrict)  
strip(stripField)  
test(test, message)  
test(options)  
transform(transformer)  
typeError(message)  
validate(value, options)  
validateAt(path, value, options) @类型不友好
validatePlus(value, options) 验证增强,包括:对象顺序验证、返回结果包含错误信息。
validatePlusSync(value, options) 验证增强,包括:对象顺序验证、返回结果包含错误信息。
validateSync(value, options)  
validateSyncAt(path, value, options) @类型不友好
when(builder)  
when(key, builder)  
when(key, builder)  
withMutation(fn)