core/forms/validation-pattern.ts
Properties |
Methods |
|
Static Readonly messages |
messages:
|
Type : object
|
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(
'International phone number required, in the format +49 9 876 543 210.'
),
loginAlias: gettext(
'Login alias must not contain slashes ("/", "\\") nor ("+"), (":"), ("$") signs.'
),
max: gettext('Max value: {{ value }}'),
min: gettext('Min value: {{ value }}'),
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 not good enough, password must be stronger (green).'),
phoneNumber: gettext(
'Invalid phone number format. Only digits, spaces, slashes ("/") and dashes ("-") allowed.'
),
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.'
)
}
|
Static Readonly rules |
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}$/
},
phoneNumber: {
pattern: /^$|^(\+|0{2})[\d\s/-]{1,30}$/
},
tenantId: {
pattern: /^[a-z]+[a-z0-9-]*[a-z0-9]+$/
},
user: {
pattern: /^[^\\/\s$:+]*$/
},
urlSegment: {
pattern: /^(([.]{1,2})|([/])+|(([/]*)([.]{1,2})([/]*))|((.*)([/]|[ ]+)(.*))|(\s+))$/
},
loginAlias: {
pattern: /^[^\\/$:+]*$/
}
}
|
Static get | ||||||
get(key: string)
|
||||||
Parameters :
Returns :
ValidationRules
|