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.
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){ super(user); } public List<Integer> validatePassword(List<Integer> errors){ if(obj.getPassword().length() < MIN_PASS_LENGTH){ errors.add(R.string.password_min_length); } if(obj.getPassword().length() > MAX_PASS_LENGTH){ errors.add(R.string.password_max_length); } return fillIsNullOrEmpty(errors, obj.getPassword()); } }