@thangk/easythemer
Version:
Easily generate shades from a colour palette for use in your app
27 lines (26 loc) • 777 B
TypeScript
/**
* Validate colour name.
* - Allowed characters: letters, numbers, spaces, underscores, and hyphens.
* - Min length: 2 characters.
* - Max length: 20 characters.
*
* @param colourName Colour name string to validate.
* @getters getResult(), getColourName(), hasErrors(), getErrorsList()
* @result string or null
*/
export default class ValidateOptionName {
private result;
private errors;
private errmsg;
private colourName;
constructor(colourName: string);
get getResult(): string | null;
get getColourName(): string;
get hasErrors(): boolean;
get getErrorsList(): string[];
private addError;
private setErrorState;
private showErrors;
private isLenTooLong;
private isLenTooShort;
}