File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ export interface BooleanValidatorType extends Validator<boolean> {
306306}
307307
308308export interface EnumValidatorType < T extends string | number > extends Validator < T > {
309- allowedValues : readonly T [ ]
309+ getAllowedValues : ( ) => readonly T [ ]
310310 custom : ( fn : ( value : T ) => boolean , message : string ) => EnumValidator < T >
311311}
312312
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ export class EnumValidator<T extends string | number> extends BaseValidator<T> i
1717 } )
1818 }
1919
20+ getAllowedValues ( ) : readonly T [ ] {
21+ return this . allowedValues
22+ }
23+
2024 custom ( fn : ( value : T ) => boolean , message : string ) : this {
2125 return this . addRule ( {
2226 name : 'custom' ,
You can’t perform that action at this time.
0 commit comments