|
@@ -10,6 +10,12 @@ class LoginGatewayController extends FControllerBase {
|
|
|
|
|
|
void onSubmit() async {
|
|
|
try {
|
|
|
+ RegExp regExp = RegExp(r'\s'); // 匹配空格的正则表达式
|
|
|
+ bool hasSpace = regExp.hasMatch(state.gateway);
|
|
|
+ if (hasSpace) {
|
|
|
+ PromptBox.toast("请输入正确的服务器地址");
|
|
|
+ return;
|
|
|
+ }
|
|
|
var checkResult = await _checkServerValidation();
|
|
|
if (!checkResult) {
|
|
|
PromptBox.toast("服务器不存在");
|