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.
[C#] Pdf pdf1 = new Pdf(); Aspose.Pdf.Generator.Section Section1 = pdf1.Sections.Add(); FormField textBox = new FormField(); textBox.FormFieldType = FormFieldType.Text; textBox.FieldName = "AText"; textBox.FormWidth = 80; textBox.FormHeight = 20; CompareValidator validator = new CompareValidator(); validator.ValueToCompare = "100"; validator.Operator = ValidationCompareOperator.LessThan; validator.ErrorMessage = "Incorrect Value"; textBox.Validators.Add(validator); Section1.Paragraphs.Add(textBox); pdf1.Save(...);
| Constructor and Description |
|---|
CompareValidator() |
| Modifier and Type | Method and Description |
|---|---|
Object |
deepClone()
Clones a new
CompareValidator object. |
String |
getControlToCompare()
Gets or sets the input control FieldName to compare with the input control being validated.
|
int |
getOperator()
Gets or sets the comparison operation to perform.
|
String |
getValueToCompare() |
void |
setControlToCompare(String value) |
void |
setOperator(int value) |
void |
setValueToCompare(String value) |
getErrorMessage, setErrorMessagepublic String getControlToCompare()
Gets or sets the input control FieldName to compare with the input control being validated.
public void setControlToCompare(String value)
public int getOperator()
Gets or sets the comparison operation to perform.
public void setOperator(int value)
public String getValueToCompare()
public void setValueToCompare(String 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.ICloneabledeepClone in class BaseValidatorCompareValidator object.Copyright © 2016 Aspose. All Rights Reserved.