File

core/forms/validation-pattern.ts

Index

Properties
Methods

Properties

Static Readonly messages
Default value : { deviceId: gettext('Device ID must not contain spaces or slashes ("/").'), domain: gettext( 'Only lowercase letters, digits and hyphens allowed in the first part of the URI. ' + 'Must start with a letter; hyphens only allowed in the middle. Must be a valid URI.' ), email: gettext('Invalid email address.'), emails: gettext('Invalid email addresses.'), internationalPhoneNumber: gettext( 'Must be a valid phone number (only digits, spaces, slashes ("/"), dashes ("-"), and plus ("+") allowed, for example: +49 9 876 543 210).' ), loginAlias: gettext( 'Login alias must not contain slashes ("/", "\\") nor ("+"), (":"), ("$") signs.' ), invalidColor: gettext('Invalid color "{{ currentValue }}".'), max: gettext('Max value: {{ max }}'), min: gettext('Min value: {{ min }}'), minLength: gettext('Should have at least {{ minLength }} characters.'), minlength: gettext('Should have at least {{ requiredLength }} characters.'), maxLength: gettext('Should have at most {{ maxLength }} characters.'), maxlength: gettext('Should have at most {{ requiredLength }} characters.'), pattern: gettext('Does not match pattern {{ requiredPattern }}.'), opcuaBrowsePath: gettext('Invalid OPC UA URI.'), password: gettext( 'Password must have at least 8 characters and no more than 32 and can only contain letters, numbers and following symbols: `~!@#$%^&*()_|+-=?;:\'",.<>{}[]\\/' ), passwordConfirm: gettext('Passwords do not match.'), passwordStrength: gettext('Password is not strong enough, use a stronger password.'), passwordStrengthChecklist: gettext( 'Password is not strong enough, use a stronger password. Check the requirements listed on the right.' ), required: gettext('This field is required.'), tenantId: gettext( 'May contain lowercase letters, digits, and hyphens. ' + 'Must start with a letter; hyphens only allowed in the middle; minimum 2 characters.' ), urlSegment: gettext('Slash, single or double dots and white space not allowed.'), user: gettext( 'Username must not contain spaces nor slashes ("/", "\\") nor ("+"), (":"), ("$") signs.' ), httpUrl: gettext('Must be a valid HTTP(S) URL.'), colonedHexNumber: gettext( 'Must be a valid hexadecimal number. Must contain only the following characters: 0-9, a-f, A-F, :.' ), noDots: gettext('Dots not allowed.'), integer: gettext('Invalid type, expected integer.'), simpleJsonPath: gettext('Must be a valid JSON path'), [DatapointLibraryValidationErrors.SHOULD_CONTAIN_NUMBER]: gettext( 'This field must contain a number.' ), [DatapointLibraryValidationErrors.SHOULD_BE_DEFINED]: gettext('Value must be defined.'), [DatapointLibraryValidationErrors.GREATER_THAN_SCALE_MAX]: gettext( 'Value must be less than scale maximum.' ), [DatapointLibraryValidationErrors.LESS_THAN_SCALE_MIN]: gettext( 'Value must be greater than scale minimum.' ), [DatapointLibraryValidationErrors.GREATER_THAN_RANGE_MAX]: gettext( 'Value must be less than respective maximum.' ), [DatapointLibraryValidationErrors.LESS_THAN_RANGE_MIN]: gettext( 'Value must be greater than respective minimum.' ) } as const
Static Readonly rules
Type : object
Default value : { deviceId: { pattern: /^[^\s/]*$/ }, domain: { pattern: /^[a-z]+[a-z0-9-]*[a-z0-9]+\.{1}.+$/ }, groupName: { maxLength: 254 }, hostname: { pattern: /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/ }, ip: { pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/ }, opcuaBrowsePath: { pattern: /^(opc.tcp|http|https):\/\/[^ "]+$/ }, password: { pattern: /^[a-zA-Z0-9`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]{8,32}$/ }, tenantId: { pattern: /^[a-z]+[a-z0-9-]*[a-z0-9]+$/ }, user: { pattern: /^[^\\/\s$:+]*$/ }, urlSegment: { pattern: /^(([.]{1,2})|([/])+|(([/]*)([.]{1,2})([/]*))|((.*)([/]|[ ]+)(.*))|(\s+))$/ }, loginAlias: { pattern: /^[^\\/$:+]*$/ }, noDots: { pattern: /^[^.]*$/ }, httpUrl: { pattern: /^(https?):\/\/.*$/ }, colonedHexNumber: { pattern: /^[0-9a-fA-F:]+$/ }, integer: { pattern: /^-?\d+$/ } }

Methods

Static get
get(key: string)
Parameters :
Name Type Optional
key string No
Returns : ValidationRules

results matching ""

    No results matching ""