UNPKG

altheia-async-data-validator

Version:

A very simple, fast and customizable async data validator

73 lines (72 loc) 1.4 kB
import { TypeBase } from './base'; import { LangList } from '../types/lang'; export declare const messages: LangList; /** * Internet class */ export declare class TypeInternet extends TypeBase { /** * Constructor */ constructor(); _cast(): void; /** * Test to validate the type of the value * * @return {this} */ typeof(): this; /** * Force a string to be a valid url (RFC) * * @return {this} */ url(): this; /** * Force a string to be a valid hostname (RFC) * * @return {this} */ hostname(): this; /** * Force a string to be a valid hex (a-f0-9) * * @return {this} */ hex(): this; /** * Force a string to be a valid credit card (using Luhn's algorithm) * * @return {this} */ creditCard(): this; /** * Force a string to be a valid uuid version 4 * * @return {this} */ uuidv4(): this; /** * Force a string to be a valid ipv4 or ipv6 * * @return {this} */ ip(): this; /** * Force a string to be a valid ipv4 * * @return {this} */ ipv4(): this; /** * Force a string to be a valid ipv6 * * @return {this} */ ipv6(): this; } declare const def: { Class: typeof TypeInternet; messages: LangList; }; export default def;