Home > @websublime/schema > StringSchemaType
StringSchemaType class
String model type validation
Signature:
export declare class StringSchemaType extends BaseSchemaType<string>
Extends: BaseSchemaType<string>
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(errorMessage) | Create StringSchemaType instance |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| type | string |
Methods
| Method | Modifiers | Description |
|---|---|---|
| containsLetter(errorMessage) | Test if value contains only letters | |
| containsLetterOnly(errorMessage) | Test if value contains letters only | |
| containsLowercaseLetter(errorMessage) | Test if value is lowercase | |
| containsNumber(errorMessage) | Test if value contains numbers | |
| containsUppercaseLetter(errorMessage) | Test if value is uppercase | |
| isEmail(errorMessage) | Test if is a valid email | |
| isHex(errorMessage) | Test if is a hex value | |
| isOneOf(values, errorMessage) | Test if is one of other types included | |
| isURL(errorMessage) | Test if is a valid url | |
| maxLength(maxLength, errorMessage) | Test if string is less then maximum length | |
| minLength(minLength, errorMessage) | Test if string as minmum length | |
| pattern(regexp, errorMessage) | Test a reg expression | |
| rangeLength(minLength, maxLength, errorMessage) | Test if string length is between minimum and maximum length |