import React from 'react' import { Container } from '@toptal/picasso' import { SPACING_4 } from '@toptal/picasso-utils' import { FormNonCompound, Input, NumberInput, SubmitButton, } from '@toptal/picasso-forms' const minMaxValidator = (value?: string | number) => { if (value === undefined) { return undefined } const number = Number(value) if (number < 0) { return "Age can't be negative" } if (number > 120) { return "Age can't have value more than 120 years" } return undefined } const CustomValidatorExample = () => ( window.alert(JSON.stringify(values, undefined, 2))} > Submit ) export default CustomValidatorExample