Input validation in Android
I am getting an error for the IsInputEditTextEmail boolean method. I know the matches parameter for Patterns.EMAIL_ADDRESS.matcher(value.matches())
is supposed to take in a parameter just unsure as to what the parameter should be?
The attached image is the error I am receiving for the InputValidation.java code which is shown below.
package edu.spelman.spelfitscmail.spelfit.helper;
import android.app.Activity;
import android.content.Context;
import android.util.Patterns;
import android.view.WindowManager;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.support.design.widget.TextInputEditText;
import android.support.design.widget.TextInputLayout;
public class InputValidation {
private Context context;
public InputValidation(Context context) {
this.context = context;
}
public boolean isinputEditTextFilled(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message) {
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty()) {
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextEmail(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message){
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value.matches())){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else {
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextMatches(TextInputEditText textInputEditText1, TextInputEditText textInputEditText2, TextInputLayout textInputLayout, String message){
String value1 = textInputEditText1.getText().toString().trim();
String value2 = textInputEditText2.getText().toString().trim();
if (!value1.contentEquals(value2)){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText2);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
private void hideKeyboardFrom(View view){
InputMethodManager imm =(InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
java android
add a comment |
I am getting an error for the IsInputEditTextEmail boolean method. I know the matches parameter for Patterns.EMAIL_ADDRESS.matcher(value.matches())
is supposed to take in a parameter just unsure as to what the parameter should be?
The attached image is the error I am receiving for the InputValidation.java code which is shown below.
package edu.spelman.spelfitscmail.spelfit.helper;
import android.app.Activity;
import android.content.Context;
import android.util.Patterns;
import android.view.WindowManager;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.support.design.widget.TextInputEditText;
import android.support.design.widget.TextInputLayout;
public class InputValidation {
private Context context;
public InputValidation(Context context) {
this.context = context;
}
public boolean isinputEditTextFilled(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message) {
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty()) {
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextEmail(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message){
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value.matches())){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else {
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextMatches(TextInputEditText textInputEditText1, TextInputEditText textInputEditText2, TextInputLayout textInputLayout, String message){
String value1 = textInputEditText1.getText().toString().trim();
String value2 = textInputEditText2.getText().toString().trim();
if (!value1.contentEquals(value2)){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText2);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
private void hideKeyboardFrom(View view){
InputMethodManager imm =(InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
java android
add a comment |
I am getting an error for the IsInputEditTextEmail boolean method. I know the matches parameter for Patterns.EMAIL_ADDRESS.matcher(value.matches())
is supposed to take in a parameter just unsure as to what the parameter should be?
The attached image is the error I am receiving for the InputValidation.java code which is shown below.
package edu.spelman.spelfitscmail.spelfit.helper;
import android.app.Activity;
import android.content.Context;
import android.util.Patterns;
import android.view.WindowManager;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.support.design.widget.TextInputEditText;
import android.support.design.widget.TextInputLayout;
public class InputValidation {
private Context context;
public InputValidation(Context context) {
this.context = context;
}
public boolean isinputEditTextFilled(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message) {
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty()) {
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextEmail(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message){
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value.matches())){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else {
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextMatches(TextInputEditText textInputEditText1, TextInputEditText textInputEditText2, TextInputLayout textInputLayout, String message){
String value1 = textInputEditText1.getText().toString().trim();
String value2 = textInputEditText2.getText().toString().trim();
if (!value1.contentEquals(value2)){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText2);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
private void hideKeyboardFrom(View view){
InputMethodManager imm =(InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
java android
I am getting an error for the IsInputEditTextEmail boolean method. I know the matches parameter for Patterns.EMAIL_ADDRESS.matcher(value.matches())
is supposed to take in a parameter just unsure as to what the parameter should be?
The attached image is the error I am receiving for the InputValidation.java code which is shown below.
package edu.spelman.spelfitscmail.spelfit.helper;
import android.app.Activity;
import android.content.Context;
import android.util.Patterns;
import android.view.WindowManager;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.support.design.widget.TextInputEditText;
import android.support.design.widget.TextInputLayout;
public class InputValidation {
private Context context;
public InputValidation(Context context) {
this.context = context;
}
public boolean isinputEditTextFilled(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message) {
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty()) {
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextEmail(TextInputEditText textInputEditText, TextInputLayout textInputLayout, String message){
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value.matches())){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText);
return false;
} else {
textInputLayout.setErrorEnabled(false);
}
return true;
}
public boolean isInputEditTextMatches(TextInputEditText textInputEditText1, TextInputEditText textInputEditText2, TextInputLayout textInputLayout, String message){
String value1 = textInputEditText1.getText().toString().trim();
String value2 = textInputEditText2.getText().toString().trim();
if (!value1.contentEquals(value2)){
textInputLayout.setError(message);
hideKeyboardFrom(textInputEditText2);
return false;
} else{
textInputLayout.setErrorEnabled(false);
}
return true;
}
private void hideKeyboardFrom(View view){
InputMethodManager imm =(InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
java android
java android
edited Nov 13 '18 at 6:08
Shashanth
2,49642136
2,49642136
asked Nov 13 '18 at 2:33
Meera436Meera436
204
204
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Patterns.EMAIL_ADDRESS.matcher(value.matches()) does not return boolean value. in order to return boolean value you should use matches() method like below in the if statement
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value).matches())
add a comment |
You are getting an error because .matcher()
takes CharSequence
as argument but you are passing boolean
because value.matches()
returns boolean
.
So instead of
Patterns.EMAIL_ADDRESS.matcher(value.matches())
You should be doing
Patterns.EMAIL_ADDRESS.matcher(value).matches()
add a comment |
Create Util Class. Add isValidEmaillId Method in Util Class
public static boolean isValidEmaillId(String email){
return Pattern.compile("^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
+ "([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$").matcher(email).matches();
}
use this ur Actitty class
String Email= textInputEditText2.getText().toString().trim();
if (Email.isEmpty()|| !Util.isValidEmaillId(Email)){
Toast.makeText(this, "Must Enter Valid Email ",
Toast.LENGTH_SHORT).show();
return;
}
add a comment |
you just have to take a global variable with some name like pattern match and after that you have to create an method and you can call that method anywhere where you have to validate the email. method will split the string and check whether it is matching the pattern or not if it is false it will generate error otherwise it will return the result true and based on that result you can do whatever your project need is. example is given below
/*take this as golabl variable*/
private String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\.+[a-z]+\.+[a-z]+";
/*in some method i have to validate that the entered email is valid or not*/
boolean result = validateEmail();
validateEmail()
{
String email = textInputEditText.getText().toString().trim();
if (!email.isEmpty()) {
if (email.length() != 0) {
String data = cc.split(",");
for (int i = 0; i < data.length; i++) {
if (!email.matches(emailPattern)) {
textInputEditText.setError("Invalid");
return false;
}
}
}
}
return true;
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272938%2finput-validation-in-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Patterns.EMAIL_ADDRESS.matcher(value.matches()) does not return boolean value. in order to return boolean value you should use matches() method like below in the if statement
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value).matches())
add a comment |
Patterns.EMAIL_ADDRESS.matcher(value.matches()) does not return boolean value. in order to return boolean value you should use matches() method like below in the if statement
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value).matches())
add a comment |
Patterns.EMAIL_ADDRESS.matcher(value.matches()) does not return boolean value. in order to return boolean value you should use matches() method like below in the if statement
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value).matches())
Patterns.EMAIL_ADDRESS.matcher(value.matches()) does not return boolean value. in order to return boolean value you should use matches() method like below in the if statement
String value = textInputEditText.getText().toString().trim();
if (value.isEmpty() || Patterns.EMAIL_ADDRESS.matcher(value).matches())
answered Nov 13 '18 at 6:44
AmirAmir
159214
159214
add a comment |
add a comment |
You are getting an error because .matcher()
takes CharSequence
as argument but you are passing boolean
because value.matches()
returns boolean
.
So instead of
Patterns.EMAIL_ADDRESS.matcher(value.matches())
You should be doing
Patterns.EMAIL_ADDRESS.matcher(value).matches()
add a comment |
You are getting an error because .matcher()
takes CharSequence
as argument but you are passing boolean
because value.matches()
returns boolean
.
So instead of
Patterns.EMAIL_ADDRESS.matcher(value.matches())
You should be doing
Patterns.EMAIL_ADDRESS.matcher(value).matches()
add a comment |
You are getting an error because .matcher()
takes CharSequence
as argument but you are passing boolean
because value.matches()
returns boolean
.
So instead of
Patterns.EMAIL_ADDRESS.matcher(value.matches())
You should be doing
Patterns.EMAIL_ADDRESS.matcher(value).matches()
You are getting an error because .matcher()
takes CharSequence
as argument but you are passing boolean
because value.matches()
returns boolean
.
So instead of
Patterns.EMAIL_ADDRESS.matcher(value.matches())
You should be doing
Patterns.EMAIL_ADDRESS.matcher(value).matches()
answered Nov 13 '18 at 3:44
Naveen NiraulaNaveen Niraula
347214
347214
add a comment |
add a comment |
Create Util Class. Add isValidEmaillId Method in Util Class
public static boolean isValidEmaillId(String email){
return Pattern.compile("^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
+ "([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$").matcher(email).matches();
}
use this ur Actitty class
String Email= textInputEditText2.getText().toString().trim();
if (Email.isEmpty()|| !Util.isValidEmaillId(Email)){
Toast.makeText(this, "Must Enter Valid Email ",
Toast.LENGTH_SHORT).show();
return;
}
add a comment |
Create Util Class. Add isValidEmaillId Method in Util Class
public static boolean isValidEmaillId(String email){
return Pattern.compile("^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
+ "([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$").matcher(email).matches();
}
use this ur Actitty class
String Email= textInputEditText2.getText().toString().trim();
if (Email.isEmpty()|| !Util.isValidEmaillId(Email)){
Toast.makeText(this, "Must Enter Valid Email ",
Toast.LENGTH_SHORT).show();
return;
}
add a comment |
Create Util Class. Add isValidEmaillId Method in Util Class
public static boolean isValidEmaillId(String email){
return Pattern.compile("^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
+ "([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$").matcher(email).matches();
}
use this ur Actitty class
String Email= textInputEditText2.getText().toString().trim();
if (Email.isEmpty()|| !Util.isValidEmaillId(Email)){
Toast.makeText(this, "Must Enter Valid Email ",
Toast.LENGTH_SHORT).show();
return;
}
Create Util Class. Add isValidEmaillId Method in Util Class
public static boolean isValidEmaillId(String email){
return Pattern.compile("^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
+ "([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$").matcher(email).matches();
}
use this ur Actitty class
String Email= textInputEditText2.getText().toString().trim();
if (Email.isEmpty()|| !Util.isValidEmaillId(Email)){
Toast.makeText(this, "Must Enter Valid Email ",
Toast.LENGTH_SHORT).show();
return;
}
edited Nov 13 '18 at 4:35
answered Nov 13 '18 at 4:29
suresh madaparthisuresh madaparthi
25419
25419
add a comment |
add a comment |
you just have to take a global variable with some name like pattern match and after that you have to create an method and you can call that method anywhere where you have to validate the email. method will split the string and check whether it is matching the pattern or not if it is false it will generate error otherwise it will return the result true and based on that result you can do whatever your project need is. example is given below
/*take this as golabl variable*/
private String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\.+[a-z]+\.+[a-z]+";
/*in some method i have to validate that the entered email is valid or not*/
boolean result = validateEmail();
validateEmail()
{
String email = textInputEditText.getText().toString().trim();
if (!email.isEmpty()) {
if (email.length() != 0) {
String data = cc.split(",");
for (int i = 0; i < data.length; i++) {
if (!email.matches(emailPattern)) {
textInputEditText.setError("Invalid");
return false;
}
}
}
}
return true;
add a comment |
you just have to take a global variable with some name like pattern match and after that you have to create an method and you can call that method anywhere where you have to validate the email. method will split the string and check whether it is matching the pattern or not if it is false it will generate error otherwise it will return the result true and based on that result you can do whatever your project need is. example is given below
/*take this as golabl variable*/
private String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\.+[a-z]+\.+[a-z]+";
/*in some method i have to validate that the entered email is valid or not*/
boolean result = validateEmail();
validateEmail()
{
String email = textInputEditText.getText().toString().trim();
if (!email.isEmpty()) {
if (email.length() != 0) {
String data = cc.split(",");
for (int i = 0; i < data.length; i++) {
if (!email.matches(emailPattern)) {
textInputEditText.setError("Invalid");
return false;
}
}
}
}
return true;
add a comment |
you just have to take a global variable with some name like pattern match and after that you have to create an method and you can call that method anywhere where you have to validate the email. method will split the string and check whether it is matching the pattern or not if it is false it will generate error otherwise it will return the result true and based on that result you can do whatever your project need is. example is given below
/*take this as golabl variable*/
private String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\.+[a-z]+\.+[a-z]+";
/*in some method i have to validate that the entered email is valid or not*/
boolean result = validateEmail();
validateEmail()
{
String email = textInputEditText.getText().toString().trim();
if (!email.isEmpty()) {
if (email.length() != 0) {
String data = cc.split(",");
for (int i = 0; i < data.length; i++) {
if (!email.matches(emailPattern)) {
textInputEditText.setError("Invalid");
return false;
}
}
}
}
return true;
you just have to take a global variable with some name like pattern match and after that you have to create an method and you can call that method anywhere where you have to validate the email. method will split the string and check whether it is matching the pattern or not if it is false it will generate error otherwise it will return the result true and based on that result you can do whatever your project need is. example is given below
/*take this as golabl variable*/
private String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\.+[a-z]+\.+[a-z]+";
/*in some method i have to validate that the entered email is valid or not*/
boolean result = validateEmail();
validateEmail()
{
String email = textInputEditText.getText().toString().trim();
if (!email.isEmpty()) {
if (email.length() != 0) {
String data = cc.split(",");
for (int i = 0; i < data.length; i++) {
if (!email.matches(emailPattern)) {
textInputEditText.setError("Invalid");
return false;
}
}
}
}
return true;
answered Nov 13 '18 at 6:44
Anusha MathurAnusha Mathur
7513
7513
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272938%2finput-validation-in-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown