public class RegularExpressionValidator extends BaseValidator implements com.aspose.ms.System.ICloneable
Makes the associated input control a required field.
[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); RegularExpressionValidator validator = new RegularExpressionValidator(); validator.setValidationExpression ( "^[0-9]+$"); validator.setErrorMessage ( "Value does not match validation expression"); textBox.setValidators().add(validator); Section1.getParagraphs().add(textBox); pdf1.save(...);
Constructor and Description |
---|
RegularExpressionValidator() |
Modifier and Type | Method and Description |
---|---|
Object |
deepClone()
Clones a new
RegularExpressionValidator object. |
String |
getValidationExpression()
Gets or sets the regular expression that determines the pattern used to validate a field.
|
void |
setValidationExpression(String value) |
getErrorMessage, setErrorMessage
public String getValidationExpression()
Gets or sets the regular expression that determines the pattern used to validate a field.
public void setValidationExpression(String value)
public Object deepClone()
Clones a new RegularExpressionValidator
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
RegularExpressionValidator
object.Copyright © 2014 Aspose. All Rights Reserved.