fix: refine error messages for signup failure and company code
This commit is contained in:
1 parent
603b9e0032
commit
13469b14fb
2 files changed
+6
-6
No files matched your search
@@ -328,19 +328,19 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
} catch (e) {
|
||||
String eStr = e.toString().toLowerCase();
|
||||
setState(() {
|
||||
if (eStr.contains('uppercase')) {
|
||||
if (eStr.contains('password') && eStr.contains('uppercase')) {
|
||||
_passwordError = tr(
|
||||
'msg.userfront.signup.password.uppercase_required',
|
||||
);
|
||||
} else if (eStr.contains('lowercase')) {
|
||||
} else if (eStr.contains('password') && eStr.contains('lowercase')) {
|
||||
_passwordError = tr(
|
||||
'msg.userfront.signup.password.lowercase_required',
|
||||
);
|
||||
} else if (eStr.contains('digit') || eStr.contains('number')) {
|
||||
} else if (eStr.contains('password') && (eStr.contains('digit') || eStr.contains('number'))) {
|
||||
_passwordError = tr('msg.userfront.signup.password.number_required');
|
||||
} else if (eStr.contains('symbol') || eStr.contains('special')) {
|
||||
} else if (eStr.contains('password') && (eStr.contains('symbol') || eStr.contains('special'))) {
|
||||
_passwordError = tr('msg.userfront.signup.password.symbol_required');
|
||||
} else if (eStr.contains('length') || eStr.contains('12 characters')) {
|
||||
} else if (eStr.contains('password') && (eStr.contains('length') || eStr.contains('12 characters'))) {
|
||||
_passwordError = tr('msg.userfront.signup.password.length_required');
|
||||
} else {
|
||||
_passwordError = tr(
|
||||
|
||||
Reference in new issue
Block a user