in source/ui/src/util/Utils.ts [278:298]
function validateOpcUa(opcUa: OpcUaDefinition, errors: KeyStringValue) {
// Server name
if (opcUa.serverName.trim() === '' || opcUa.serverName.trim().length > MAX_OPCUA_SERVER_NAME_CHARACTERS) {
errors.opcUa_serverName = I18n.get('invalid.server.name');
}
// Machine IP
if (!IP_REGEX.test(opcUa.machineIp)) {
errors.opcUa_machineIp = I18n.get('invalid.machine.ip');
}
// Port
if (opcUa.port !== undefined) {
if (typeof opcUa.port !== 'string' || (typeof opcUa.port === 'string' && opcUa.port.trim() !== '')) {
const port = Number(opcUa.port);
if (!Number.isInteger(port) || port < MIN_PORT || port > MAX_PORT) {
errors.port = I18n.get('invalid.port');
}
}
}
}