mirror of
https://github.com/bknd-io/bknd.git
synced 2026-10-23 14:55:11 +00:00
added chainable functions in em()
This commit is contained in:
1 parent
d7ee13011f
commit
a7e3ce878a
5 files changed
+82
-28
No files matched your search
@@ -104,6 +104,12 @@ export class TextField<Required extends true | false = false> extends Field<
|
||||
);
|
||||
}
|
||||
|
||||
if (this.config.pattern && value && !new RegExp(this.config.pattern).test(value)) {
|
||||
throw new TransformPersistFailedException(
|
||||
`Field "${this.name}" must match the pattern ${this.config.pattern}`
|
||||
);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user