first commit
This commit is contained in:
7
frontend/node_modules/@rc-component/async-validator/es/rule/required.js
generated
vendored
Normal file
7
frontend/node_modules/@rc-component/async-validator/es/rule/required.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { format, isEmptyValue } from "../util";
|
||||
var required = function required(rule, value, source, errors, options, type) {
|
||||
if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
|
||||
errors.push(format(options.messages.required, rule.fullField));
|
||||
}
|
||||
};
|
||||
export default required;
|
||||
Reference in New Issue
Block a user