Back to project page baracus-framework.
The source code is released under:
Apache License
If you think the Android project baracus-framework 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 net.mantucon.baracus.validation.builtins; /*from w w w. j ava 2 s . com*/ import net.mantucon.baracus.R; import net.mantucon.baracus.validation.AbstractValidator; import net.mantucon.baracus.validation.ConstrainedView; /** * Created with IntelliJ IDEA. * User: marcus * Date: 24.09.13 * Time: 08:47 * To change this template use File | Settings | File Templates. */ public class StringNotEmpty extends AbstractValidator<String> { @Override public boolean validate(ConstrainedView<String> view) { String value = view.getCurrentValue(); if (value == null || value.toString().trim().length() == 0) { return false; } return true; } @Override public int getMessageId() { return R.string.notNullField; } }