Android Open Source - Joetz-Android-V2 User Validator

From Project

Back to project page Joetz-Android-V2.


The source code is released under:

GNU General Public License

If you think the Android project Joetz-Android-V2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.jens.myapplication.domain.validator;
//  www . j a  v  a2  s.  c om

import com.example.jens.myapplication.R;
import com.example.jens.myapplication.domain.User;

import java.util.List;

public class UserValidator extends Validator<User>{
    private static final int MIN_PASS_LENGTH = 7;
    private static final int MAX_PASS_LENGTH = 40;

    public UserValidator(User user){

    public List<Integer> validatePassword(List<Integer> errors){
        if(obj.getPassword().length() < MIN_PASS_LENGTH){
        if(obj.getPassword().length() > MAX_PASS_LENGTH){
        return fillIsNullOrEmpty(errors, obj.getPassword());

Java Source Code List