export const maxLength = (maxLength) => {
  return ({value}) => {
    let err = null
    if (!isEmptyValue(value) && value.length > maxLength) {
      err = {error: Errors.maxLength, params: {value, maxLength}}