container.ts
Version:
Modular application framework
14 lines (13 loc) • 505 B
TypeScript
import { Field } from "../field";
/** Validate.isLocale options. */
export interface IIsLocale {
/** Language/country code separator, defaults to '_'. */
separator?: string;
}
/** Validate that value is a valid locale (language_COUNTRY). */
export declare function isLocale(value?: string, options?: IIsLocale): string;
export declare class LocaleField extends Field<string> {
protected readonly options: IIsLocale;
constructor(options?: IIsLocale);
validate(value: string): string;
}