-
-
Notifications
You must be signed in to change notification settings - Fork 97
-
https://github.com/jquense/yup
class User extends YupEntity( object({ name: string().required(), lastName: string().required(), age: number().required().positive().integer(), email: string().email(), website: string().url().nullable(), createdOn: date().default(() => new Date()), })) { pk() {return this.id} get fullName() { return `${this.name} ${this.lastName}`; } }
Use the lifecycle integration of Entity.validate
Perhaps we should provide an abstract interface, so any third-party validator could be hooked up in the same way. If their APIs are too different, we could simply ship adapters as well
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
https://github.com/samchon/typia is much faster; look into using this
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment