import { ValidationResponse } from 'formstate' ; type simpleValidator = ( value , options ? : any ) => boolean ; export const nonEmpty = ( str ) => ! ! str ; export const check = ( validator , message , options ? ) => ( value ) => ( ! validator ( value , options ) && message ) as ValidationResponse ; export const checkRequired = ( msg ) => check ( nonEmpty , msg ) ;