mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 14:02:48 +00:00
Allow domains without dot
This commit is contained in:
parent
9cf505e27a
commit
be71e57efe
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ class _AddServerModalState extends State<AddServerModal> {
|
||||||
void validateAddress(String? value) {
|
void validateAddress(String? value) {
|
||||||
if (value != null && value != '') {
|
if (value != null && value != '') {
|
||||||
RegExp ipAddress = RegExp(r'^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$');
|
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]+$');
|
RegExp domain = RegExp(r'^(([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+)|((\w|-)+)$');
|
||||||
if (ipAddress.hasMatch(value) == true || domain.hasMatch(value) == true) {
|
if (ipAddress.hasMatch(value) == true || domain.hasMatch(value) == true) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ipDomainError = null;
|
ipDomainError = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue