mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-26 09:44:31 +02:00
allow only user names with at least three characters
This commit is contained in:
@@ -173,8 +173,12 @@ public class UserSettingsActivity extends Activity {
|
||||
{
|
||||
boolean validate = true;
|
||||
|
||||
if (txtUserName.getText().toString().length() < 3) {
|
||||
if (txtUserName.getText().toString().length() == 0) {
|
||||
txtUserName.setError(getResources().getString(R.string.error_user_name_required));
|
||||
} else {
|
||||
txtUserName.setError(getResources().getString(R.string.error_user_name_too_short));
|
||||
}
|
||||
validate = false;
|
||||
}
|
||||
|
||||
|
@@ -170,4 +170,5 @@
|
||||
<string name="label_feedback_message_positive">Ja klar</string>
|
||||
<string name="label_feedback_message_negative">Nein danke</string>
|
||||
<string name="label_feedback_message_issue">Würdest Du uns etwas Feedback geben?</string>
|
||||
<string name="error_user_name_too_short">Fehler Benutzername muss mind. 3 Zeichen haben</string>
|
||||
</resources>
|
@@ -82,6 +82,7 @@
|
||||
<string name="error_exporting">Error exporting</string>
|
||||
<string name="error_importing">Error importing</string>
|
||||
<string name="error_user_name_required">Error: user name is required</string>
|
||||
<string name="error_user_name_too_short">Error: user name have to be at least 3 characters</string>
|
||||
<string name="error_body_height_required">Error: body height is required</string>
|
||||
<string name="error_initial_weight_required">Error: initial weight is required</string>
|
||||
<string name="error_goal_weight_required">Error: goal weight is required</string>
|
||||
|
Reference in New Issue
Block a user