public class CompareValidator extends BaseValidator implements com.aspose.ms.System.ICloneable
Compares the value entered by the user in an input control with the value entered in another input control, or with a constant value.
[Java] Pdf pdf1 = new Pdf(); aspose.pdf.Section Section1 = pdf1.getSections().add(); FormField textBox = new FormField(); textBox.setFormFieldType ( FormFieldType.Text); textBox.setFieldName ( "AText"); textBox.setFormWidth ( 80); textBox.setFormHeight ( 20); CompareValidator validator = new CompareValidator(); validator.setValueToCompare ( "100"); validator.setOperator ( ValidationCompareOperator.LessThan); validator.setErrorMessage ( "Incorrect Value"); textBox.getValidators().add(validator); Section1.getParagraphs().add(textBox); pdf1.save(...);
Modifier and Type | Field and Description |
---|---|
String |
ControlToCompare
Gets or sets the input control FieldName to compare with the input control being validated.
|
int |
Operator
Gets or sets the comparison operation to perform.
|
String |
ValueToCompare
Gets or sets string representation of compared value
|
Constructor and Description |
---|
CompareValidator() |
Modifier and Type | Method and Description |
---|---|
Object |
deepClone()
Clones a new
CompareValidator object. |
getErrorMessage, setErrorMessage
public String ControlToCompare
Gets or sets the input control FieldName to compare with the input control being validated.
public int Operator
Gets or sets the comparison operation to perform.
public String ValueToCompare
Gets or sets string representation of compared value
public Object deepClone()
Clones a new CompareValidator
object. This method clones only the format but not contents of the cell.
deepClone
in interface com.aspose.ms.System.ICloneable
deepClone
in class BaseValidator
CompareValidator
object.Copyright © 2014 Aspose. All Rights Reserved.