- added additional modem settings and ip validation

This commit is contained in:
2025-11-11 16:22:30 +00:00
parent f571ab80a2
commit 2ccc26ebdc
4 changed files with 65 additions and 3 deletions

View File

@@ -184,3 +184,16 @@ export const reverseZoomMapping = (magnification: string) => {
break;
}
};
export function ValidateIPaddress(ipaddress: string) {
if (!ipaddress) {
return undefined;
} else if (
!/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(
ipaddress
)
) {
return "Invalid IP";
}
return undefined;
}