public class CustomValidator extends BaseValidator implements com.aspose.ms.System.ICloneable
Performs user-defined validation on an input control.
[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; CustomValidator validator = new CustomValidator(); // Check if string is in lower case validator.ValidationFunction = "var field = this.getField('AText'); if (field.value != field.value.toLowerCase()) app.alert('string must be in lower case');"; textBox.Validators.Add(validator); Section1.Paragraphs.Add(textBox); pdf1.Save(...);
Constructor and Description |
---|
CustomValidator() |
Modifier and Type | Method and Description |
---|---|
Object |
deepClone()
Clones a new
CustomValidator object. |
String |
getValidationFunction()
Gets or sets script function used for validation.
|
void |
setValidationFunction(String value) |
getErrorMessage, setErrorMessage
public String getValidationFunction()
Gets or sets script function used for validation.
public void setValidationFunction(String value)
public Object deepClone()
Clones a new CustomValidator
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
CustomValidator
object.Copyright © 2016 Aspose. All Rights Reserved.