fix: 修正驗證碼驗證被略過錯誤
尚未發送驗證碼及不輸入驗證碼皆為空字串,新增產生的驗證碼不得為空字串處理
This commit is contained in:
parent
781d8dfcdf
commit
ce02fd3b50
|
|
@ -150,7 +150,14 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code != _generatedCode) {
|
if (_generatedCode == ''){
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(content: Text('請先發送驗證碼')),
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (code == '' || code != _generatedCode) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(content: Text('驗證碼錯誤')),
|
SnackBar(content: Text('驗證碼錯誤')),
|
||||||
);
|
);
|
||||||
|
|
@ -262,6 +269,7 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
prefixIcon: Icon(Icons.person_outlined),
|
prefixIcon: Icon(Icons.person_outlined),
|
||||||
|
// TODO: user name in database setting as primary is not suitable change to username would better
|
||||||
labelText: '用戶姓名',
|
labelText: '用戶姓名',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user