|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.validation.AbstractValidator
org.formaria.validation.MinMaxValidator
public class MinMaxValidator
Performs a min/max check, reading the minimum and maximum values from the configuration file
Copyright: Copyright (c) Formaria Ltd., 2008
License: see license.txt
| Field Summary | |
|---|---|
protected float |
max
|
protected float |
min
|
| Fields inherited from class org.formaria.aria.validation.AbstractValidator |
|---|
container, currentProject, errorLevel, formattedMessage, mandatory, mask, message, showErrorBadges, start, translator, USE_FAIL_STYLE, USE_NORMAL_STYLE, USE_WARN_STYLE, validationMethod, validationName, value |
| Fields inherited from interface org.formaria.aria.validation.Validator |
|---|
IGNORE_BLANKS, LEVEL_ERROR, LEVEL_IGNORE, LEVEL_WARNING, MANDATORY, STRICT_CHECK, WEAK_CHECK |
| Constructor Summary | |
|---|---|
MinMaxValidator(Project project)
Constructors the MinMaxValidator |
|
| Method Summary | |
|---|---|
float |
getMax()
Retrieve the maximun value assigned to this validation |
float |
getMin()
Retrieve the minimum value assigned to this validation |
protected float |
getValue(java.lang.String in)
Used to get converted unit values when working with subclasses |
void |
setMax(float f)
Set the maximum value being validated against |
void |
setMin(float f)
Set the minimum value being validated against |
void |
setup(XmlElement ruleConfig,
XmlElement instanceConfig)
Set the validation parameters |
void |
validate(java.lang.Object c,
boolean forceMandatory)
Carries out the min-max validation on the fValue entered. |
| Methods inherited from class org.formaria.aria.validation.AbstractValidator |
|---|
applyErrorStyle, getLevel, getMask, getMessage, getName, getText, getValueAsString, invokeMethod, replaceToken, replaceTokens, setMask, setName, setValidationColors, setValidationMethod, throwException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float min
protected float max
| Constructor Detail |
|---|
public MinMaxValidator(Project project)
project - the owner project| Method Detail |
|---|
public void setup(XmlElement ruleConfig,
XmlElement instanceConfig)
setup in interface Validatorsetup in class AbstractValidatorruleConfig - the validator parameters as declared in the validations rules fileinstanceConfig - the validator instance parameters as declared in the page file
public void validate(java.lang.Object c,
boolean forceMandatory)
throws java.lang.Exception
forceMandatory - Indicates that its a page validation and not an inline validation so mandatory entries should be checkedc - The component triggering the validation
java.lang.Exception - Contains the details of the messageprotected float getValue(java.lang.String in)
in - the value being compared
public float getMin()
public float getMax()
public void setMin(float f)
f - The minimum value to be setpublic void setMax(float f)
f - The maximum value to be set
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||