Skip to content

Instantly share code, notes, and snippets.

@guiseek
Created October 23, 2019 23:03
Show Gist options
  • Save guiseek/a20b35bdc11a4b2a9ff04c68e0c61672 to your computer and use it in GitHub Desktop.
Save guiseek/a20b35bdc11a4b2a9ff04c68e0c61672 to your computer and use it in GitHub Desktop.
export interface ErrorMessages {
[k: string]: string;
}
export interface FormErrors {
required: (error: any) => string;
email: (error: any) => string;
min: ({ min, actual }: {
min: any;
actual: any;
}) => string;
max: ({ max, actual }: {
max: any;
actual: any;
}) => string;
minlength: ({ requiredLength, actualLength }: {
requiredLength: any;
actualLength: any;
}) => string;
maxlength: ({ requiredLength, actualLength }) => string;
pattern: ({ requiredPattern, actualValue }) => string;
[k: string]: any;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment