File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
demo/src/screens/componentScreens Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ const NumberInputScreen = () => {
111
111
if ( currentData . current ?. type === 'valid' ) {
112
112
return currentData . current . number > MINIMUM_PRICE ;
113
113
}
114
+ return false ;
114
115
} , [ ] ) ;
115
116
116
117
const isWithinDiscountPercentage = useCallback ( ( ) => {
@@ -119,6 +120,7 @@ const NumberInputScreen = () => {
119
120
currentData . current . number >= DISCOUNT_PERCENTAGE . min && currentData . current . number <= DISCOUNT_PERCENTAGE . max
120
121
) ;
121
122
}
123
+ return false ;
122
124
} , [ ] ) ;
123
125
124
126
const validate = useMemo ( ( ) : Incubator . TextFieldProps [ 'validate' ] => {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export enum Presets {
37
37
38
38
export type ValidationMessagePositionType = `${ValidationMessagePosition } ` | ValidationMessagePosition ;
39
39
40
- export type Validator = Function | keyof typeof formValidators ;
40
+ export type Validator = ( ( value ?: string ) => boolean ) | keyof typeof formValidators ;
41
41
42
42
export interface FieldStateProps extends InputProps {
43
43
validateOnStart ?: boolean ;
You can’t perform that action at this time.
0 commit comments