Back to project page Android-sample.
The source code is released under:
Apache License
If you think the Android project Android-sample 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.andreabaccega.formedittextvalidator; /*from www. j av a 2s . co m*/ import android.widget.EditText; /** * It's a validator that applies the "NOT" logical operator to the validator passed in the constructor. * @author Andrea Baccega <me@andreabaccega.com> * */ public class NotValidator extends Validator{ private Validator v; public NotValidator(String errorMessage, Validator _v) { super(errorMessage); v = _v; } public boolean isValid(EditText et) { return ! v.isValid(et); } }