Skip to content

Commit a3e97f8

Browse files
ianmacartneyConvex, Inc.
authored andcommitted
BREAKING: drop .optional (#42734)
- it has been deprecated for a while, and we want to eventually have .optional() validators. Removing it will expose anyone who is depending on it, so they don't silently fail later thinking the truthy function means it's actually optional. GitOrigin-RevId: 10dcb3d3689a136c634b25e0ab2fdd5967f8f305
1 parent 8bd2cd3 commit a3e97f8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/values/validators.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ abstract class BaseValidator<
3939
this.isOptional = isOptional;
4040
this.isConvexValidator = true;
4141
}
42-
/** @deprecated - use isOptional instead */
43-
get optional(): boolean {
44-
return this.isOptional === "optional" ? true : false;
45-
}
4642
/** @internal */
4743
abstract get json(): ValidatorJSON;
4844
/** @internal */

0 commit comments

Comments
 (0)