13 lines
239 B
TypeScript
13 lines
239 B
TypeScript
type genericValidation = {
|
|
length: { min: number; max: number };
|
|
regex: RegExp;
|
|
};
|
|
|
|
type validationResult = {
|
|
valid: boolean;
|
|
error?: string;
|
|
username?: string;
|
|
name?: string;
|
|
};
|
|
|
|
export type { genericValidation, validationResult };
|