All checks were successful
Code quality checks / biome (push) Successful in 13s
- change register email - add verify route ( mostly still needs to be tested
39 lines
712 B
TypeScript
39 lines
712 B
TypeScript
type genericValidation = {
|
|
length: { min: number; max: number };
|
|
regex: RegExp;
|
|
};
|
|
|
|
type validationResult = {
|
|
valid: boolean;
|
|
error?: string;
|
|
username?: string;
|
|
name?: string;
|
|
};
|
|
|
|
interface UrlValidationOptions {
|
|
failOnTrailingSlash?: boolean;
|
|
removeTrailingSlash?: boolean;
|
|
allowedProtocols?: string[];
|
|
requireProtocol?: boolean;
|
|
allowLocalhost?: boolean;
|
|
allowIP?: boolean;
|
|
maxLength?: number;
|
|
}
|
|
|
|
interface UrlValidationResult extends validationResult {
|
|
url?: string;
|
|
normalizedUrl?: string;
|
|
}
|
|
|
|
type simpleConfigValidation = {
|
|
isValid: boolean;
|
|
errors: string[];
|
|
};
|
|
|
|
export type {
|
|
genericValidation,
|
|
validationResult,
|
|
UrlValidationOptions,
|
|
UrlValidationResult,
|
|
simpleConfigValidation,
|
|
};
|