mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Fixed regex not allowing subsubdomains on add server
This commit is contained in:
parent
f5b0648496
commit
b4a68eee47
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
void validateAddress(String? value) {
|
||||
if (value != null && value != '') {
|
||||
RegExp ipAddress = RegExp(r'^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$');
|
||||
RegExp domain = RegExp(r'^((?!-))(xn--)?[a-z0-9][a-z0-9-_]{0,61}[a-z0-9]{0,1}\.(xn--)?([a-z0-9\-]{1,61}|[a-z0-9-]{1,30}\.[a-z]{2,})$');
|
||||
RegExp domain = RegExp(r'^([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+$');
|
||||
if (ipAddress.hasMatch(value) == true || domain.hasMatch(value) == true) {
|
||||
setState(() {
|
||||
ipDomainError = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue