Improvements and fixes

This commit is contained in:
Juan Gilsanz Polo 2023-10-07 21:51:29 +02:00
parent 2389e34571
commit 36bd7acfed
2 changed files with 59 additions and 77 deletions

View file

@ -68,7 +68,7 @@ String? validateAddress({
}) {
if (value != null && value != '') {
RegExp ipAddress = RegExp(r'^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$');
RegExp domain = RegExp(r'^(([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+)|((\w|-)+)$');
RegExp domain = RegExp(r'^(([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+)$');
if (ipAddress.hasMatch(value) == true || domain.hasMatch(value) == true) {
return null;
}