Skip to content

Commit

Permalink
Merge pull request ys1231#15 from linuxxx/feature/support-domain-name…
Browse files Browse the repository at this point in the history
…-hosts

feat: remove IP-only validation for hosts to support domain names
  • Loading branch information
ys1231 authored Nov 23, 2024
2 parents a1d3aa8 + 9c9ac5b commit 6ba8776
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/ui/addproxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ class _AddProxyWidgetState extends State<AddProxyWidget> {
),
onChanged: (value) {
// 校验只能输入ip地址
if (value.isNotEmpty &&
!RegExp(r'^[0-9.]+$').hasMatch(value)) {
_controller_proxyHost.text =
value.substring(0, value.length - 1);
}
// if (value.isNotEmpty &&
// !RegExp(r'^[0-9.]+$').hasMatch(value)) {
// _controller_proxyHost.text =
// value.substring(0, value.length - 1);
// }
_debounce.call(context, checkConnect);
},
),
Expand Down

0 comments on commit 6ba8776

Please sign in to comment.