parent
737c8598d3
commit
5fe0ec06cf
5 changed files with 23 additions and 16 deletions
@ -1,5 +1,6 @@ |
||||
import { InputTestArgs } from '../../types/TestInputFunction'; |
||||
import { MinimalInputTestArgs } from '../../types/TestInputFunction'; |
||||
|
||||
const testMax: (args: InputTestArgs) => boolean = ({ max, min }) => max >= min; |
||||
const testMax: (args: MinimalInputTestArgs) => boolean = ({ max, min }) => |
||||
max >= min; |
||||
|
||||
export default testMax; |
||||
|
@ -1,6 +1,6 @@ |
||||
import { InputTestArgs } from '../../types/TestInputFunction'; |
||||
import { MinimalInputTestArgs } from '../../types/TestInputFunction'; |
||||
|
||||
const testNotBlank: (args: InputTestArgs) => boolean = ({ value }) => |
||||
const testNotBlank: (args: MinimalInputTestArgs) => boolean = ({ value }) => |
||||
value ? String(value).length > 0 : false; |
||||
|
||||
export default testNotBlank; |
||||
|
@ -1,6 +1,9 @@ |
||||
import { InputTestArgs } from '../../types/TestInputFunction'; |
||||
import { MinimalInputTestArgs } from '../../types/TestInputFunction'; |
||||
|
||||
const testRange: (args: InputTestArgs) => boolean = ({ max, min, value }) => |
||||
value ? value >= min && value <= max : false; |
||||
const testRange: (args: MinimalInputTestArgs) => boolean = ({ |
||||
max, |
||||
min, |
||||
value, |
||||
}) => (value ? value >= min && value <= max : false); |
||||
|
||||
export default testRange; |
||||
|
Loading…
Reference in new issue