Overview
Input field validation ensures that user input meets specific criteria before processing. It's crucial for data integrity, user experience, and security. This following article outlines the basic input fields & validation within the SecureExchange platform.
Input Fields
Field name | Required | Min | Max | Regex | Notes |
first name | 1 | 64 | no white space first name e.g.: " " | ||
last name | 1 | 64 | no white space last name e.g.: " " | ||
mobile number | 9 | 14 | ^[\d\s]{9,14}$ |
EMP Frontend regex compatible with global one (column `regex`): /^0?[1-9][\d\s]{9,13}$/ optional leading 0 is removed before sent to backend. |
|
mobile country code | 1 | 10 | ^\+?\d{1,10}$ |
+ is optional, 1-10 digits allowed EMP Frontend regex compatible with global one (column `regex`): /^\+\d{1,10}$|^(00)\d{1,8}$/ |
|
mobile number with country prefix | 10 | 50 | ^(\+|00)([1-9])([-\s().]*\\d[-\s().]*){7,21}$ |
always starts with + or 00 then non-zero one digit 1-9 then number with the length 7 to 21 number can include any number of special characters. Whole size is max 50 |
|
username | 4 | 50 | ^\S+$ | no white space username allowed e.g.: " " | |
password | 12 | 255 | |||
secureexchange name | 4 | 123 | no Control And Special Characters /^[^\x7F\x00-\x1F/\\:*?"<>|]*$/ |
no white space name allowed e.g.: " " | |
secureexchange description | 1 | 1024 | no white space description allowed e.g.: " " | ||
(first login and change) password & confirm password | 12 | 255 | no white space password allowed e.g.: " " | ||
change password current password | 1 |
no white space password allowed e.g.: " " no max limit, because it is not sent to the backend |
|||
login username | 1 | no max limit, because it is not sent to the backend | |||
login password | 1 |
no white space password allowed e.g.: " " no max limit, because it is not sent to the backend |
|||
languageCode | 2 | 2 | N/A, as it is a selection box → no user input text | ||
file & folder name | 1 | 128 |
for folder names:
^[^\\p{Cntrl}/\\\\:\\*\\?\"<>|]*$
/^(?!(\.+\/)|\.\s+$|\.+$).*$/ |
for folders:
|