- useValidation(): {
commaAwareLength: ((param: {
max?: number;
min?: number;
}) => ((value: any) => string | true));
length: ((param: {
max?: number;
min?: number;
}) => ((value: any) => string | true));
required: ((message?: string) => ((value?:
| string
| number
| boolean
| string[]
| boolean[]
| number[]) => string | true));
} Returns {
commaAwareLength: ((param: {
max?: number;
min?: number;
}) => ((value: any) => string | true));
length: ((param: {
max?: number;
min?: number;
}) => ((value: any) => string | true));
required: ((message?: string) => ((value?:
| string
| number
| boolean
| string[]
| boolean[]
| number[]) => string | true));
}
commaAwareLength: ((param: {
max?: number;
min?: number;
}) => ((value: any) => string | true))
- (param): ((value: any) => string | true)
Parameters
- param: {
max?: number;
min?: number;
}Optional
max?: number
Optional
min?: number
Returns ((value: any) => string | true)
カンマを考慮した文字数チェック関数
- (value): string | true
Returns string | true
length: ((param: {
max?: number;
min?: number;
}) => ((value: any) => string | true))
- (param): ((value: any) => string | true)
Parameters
- param: {
max?: number;
min?: number;
}Optional
max?: number
Optional
min?: number
Returns ((value: any) => string | true)
文字数チェック関数
- (value): string | true
Returns string | true
required: ((message?: string) => ((value?:
| string
| number
| boolean
| string[]
| boolean[]
| number[]) => string | true))
- (message?): ((value?:
| string
| number
| boolean
| string[]
| boolean[]
| number[]) => string | true) Returns ((value?:
| string
| number
| boolean
| string[]
| boolean[]
| number[]) => string | true)
必須入力チェック関数
- (value?): string | true
Parameters
Optional
value:
| string
| number
| boolean
| string[]
| boolean[]
| number[]
Returns string | true
バリデーションチェックを行うロジックを生成します。