Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Understanding validation rules – PB Docs 2021 – PowerBuilder Library

Understanding validation rules – PB Docs 2021

Understanding validation rules

Validation rules are criteria that a DataWindow object uses to
validate data entered into a column by users. They are
PowerBuilder-specific and therefore not enforced by the DBMS.

Validation rules assigned in the Database painter are used by
default when you place columns in a DataWindow object. You can
override the default rules in the DataWindow painter.

A validation rule is an expression that evaluates to either
“true” or “false”. If the expression evaluates to “true” for an entry
into a column, PowerBuilder accepts the entry. If the expression
evaluates to “false”, the entry is not accepted and the ItemError
event is triggered. By default, PowerBuilder displays a message box to
the user. You can customize the message displayed when a value is
rejected.

You can also code the ItemError event to cause different
processing to happen.

For more information, see the section called “Using
DataWindow Objects”
in DataWindow Programmers Guide.

At runtime

In scripts, you can use the GetValidate method to obtain the
validation rule for a column and the SetValidate method to change
the validation rule for a column.

For information about the GetValidate and SetValidate methods,
see the section called “GetValidate” in DataWindow Reference and the section called “SetValidate” in DataWindow Reference.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x