Skip to content

Commit fd3c058

Browse files
committed
fix: date validator need to check undefined value and return to make it work
1 parent d5a659f commit fd3c058

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/core/src/lib/validators/built-in-validators/dateTypeValidator.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export class DateTypeValidator extends InputValidator {
3939
}
4040

4141
public validateData(value: string, args?: DateInputArgs) {
42+
if (isUndefined(value)) return;
43+
4244
let valid = dayjs(value).isValid();
4345
// if there are args passed
4446
if (!isUndefined(args)) {

0 commit comments

Comments
 (0)