Fix required validation not returning array

This commit is contained in:
2023-02-20 12:21:10 +10:00
parent 9025581db8
commit 7cfc24cf39

View File

@@ -745,10 +745,11 @@ export function Required(
validate: function (value: string): ValidationResult {
return {
valid: value.length > 0,
invalidMessages:
invalidMessages: [
typeof this.invalidMessage === "string"
? this.invalidMessage
: this.invalidMessage(this),
],
};
},
};