mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Extracted some regexps to external file
This commit is contained in:
parent
4282792ebd
commit
ce7a8e8cc5
16 changed files with 50 additions and 44 deletions
|
@ -1,3 +1,4 @@
|
|||
import 'package:adguard_home_manager/constants/regexps.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -91,9 +92,8 @@ class _StatisticsSettingsState extends State<StatisticsSettings> {
|
|||
|
||||
|
||||
void validateDomain(String value, String id) {
|
||||
final domainRegex = RegExp(r'^([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+$');
|
||||
bool error = false;
|
||||
if (domainRegex.hasMatch(value)) {
|
||||
if (Regexps.domain.hasMatch(value)) {
|
||||
error = false;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue