forked from eatvio/eatvio_app
refactor(registration): remove username
This commit is contained in:
@@ -177,7 +177,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
||||
Future<bool> canGoNext(RegistrationState state) async {
|
||||
switch (step) {
|
||||
case 2:
|
||||
List<String> errors = validateCredentialsFields(state.sheet.email, state.sheet.name, state.sheet.password, state.sheet.passwordConfirmation);
|
||||
List<String> errors = validateCredentialsFields(state.sheet.email, state.sheet.password, state.sheet.passwordConfirmation);
|
||||
if (errors.isEmpty) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -347,7 +347,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
||||
return errors;
|
||||
}
|
||||
|
||||
List<String> validateCredentialsFields(String email, String name, String password, String passwordConfirmation) {
|
||||
List<String> validateCredentialsFields(String email, String password, String passwordConfirmation) {
|
||||
List<String> errors = [];
|
||||
|
||||
if (!isEmail(email)) {
|
||||
@@ -358,18 +358,6 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
||||
errors.add('email_empty'.tr);
|
||||
}
|
||||
|
||||
if (name.length < 6) {
|
||||
errors.add('name_short'.tr);
|
||||
}
|
||||
|
||||
if (name.isEmpty) {
|
||||
errors.add('name_empty'.tr);
|
||||
}
|
||||
|
||||
if (password.isEmpty) {
|
||||
errors.add('name_empty'.tr);
|
||||
}
|
||||
|
||||
if (password.length < 6) {
|
||||
errors.add('password_short'.tr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user