com.sksamuel.jqm4gwt.form.validators.EqualValueValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jqm4gwt-standalone Show documentation
Show all versions of jqm4gwt-standalone Show documentation
jqm4gwt bundled with all of its dependencies
The newest version!
package com.sksamuel.jqm4gwt.form.validators;
import com.google.gwt.user.client.ui.HasValue;
/**
* @author Stephen K Samuel [email protected] 14 Jul 2011 13:49:01
*
*
A implementation of {@link Validator} that checks that two fields are
* either both null or that they have the same value.
*
*/
public class EqualValueValidator extends CompareStringValueValidator {
public EqualValueValidator(HasValue hasValue1, HasValue hasValue2, String msg) {
super(hasValue1, hasValue2, msg);
}
@Override
protected boolean areValuesValid(String val1, String val2) {
return val1.equals(val2);
}
}