Validation Rules properties
Description
Create or change a validation rule.
General tab
Validation Name
Enter the name of the validation rule if you are defining
a new rule. If you are editing a rule, you cannot change the name.
Datatype
Select the datatype you are defining the validation rule for.
If you are editing a rule, you cannot change the datatype.
Validation Error Message
(Optional) Enter the error message that will display if the
entry does not pass the validation rule. If you do not enter a customized
message, PowerBuilder displays the default message:
|
1 |
'Item ~'' + @ColumnName + '~' does not pass validation test.' |
Definition tab
|
Select this |
To paste this at the cursor location |
|---|---|
|
Match |
A match pattern for a character column. |
|
@col |
A placeholder for the column name |
|
A function from the Functions list box |
The selected function |
Validation Rule
Enter the validation rule or edit the rule displayed. The Validation
Rule box displays a rule only if you are editing a validation rule.
Example
To pass this validation rule, the data in the emp_id
column must be 3 letters followed by 2 digits that are greater than
0:
|
1 |
match(@emp_id, "^[A-Za-z][A-Za-z][A-Za-z][0-9][0-9]$") |
|
1 |
    AND Integer(Right(@emp_id,2))>0 |