in src/framework/Validator.ts [63:75]
export function validateArrayItemMinMax(a:Assembly, schema:MFieldSchemaAnonymity, value:any, path:string): MValidationResult {
if(schema.min){
if(!value || value.length < schema.min) {
return {message: `至少选择${schema.min}项`, path};
}
}
if(schema.max){
if(!value || value.length > schema.max) {
return {message: `最多选择${schema.max}项`, path};
}
}
return undefined;
}