validate-kaike-js
Version:
A small validation library
44 lines (43 loc) • 1.18 kB
TypeScript
import { Country } from "./types/country";
import { EmailProvider } from "./types/email";
import { PhoneCountryCode } from "./types/phone";
type Props = {
input: string;
country?: Country;
provider?: EmailProvider;
phoneCountryCode?: PhoneCountryCode;
};
export declare const validate: (validations: {
fn: (props: Props) => {
message: string;
value: string;
};
input: string;
country?: Country;
provider?: EmailProvider;
phoneCountryCode?: PhoneCountryCode;
}[]) => Promise<{
message: string;
value: string;
}[]>;
export declare const validateEmail: ({ input, provider }: Props) => {
message: string;
value: string;
};
export declare const validateIdentityCard: ({ input, country }: Props) => {
message: string;
value: string;
};
export declare const validateIban: ({ input, country }: Props) => {
message: string;
value: string;
};
export declare const validatePassort: ({ input, country }: Props) => {
message: string;
value: string;
};
export declare const validatePhoneCountryCode: ({ input, phoneCountryCode }: Props) => {
message: string;
value: string;
};
export {};