McBasic™Get McBasic™ ↗
Build 881
Components · Nonvisual component
ValidationProvider component icon

ValidationProvider

Combine built-in validity with a business rule attached to a named control.

2 properties0 events0 methods

Use it in a Form#

valFields.Target selects which field receives ErrorText. Setting ErrorText to an empty string clears that field’s previous message. The age rule is applied only after numAge.IsValid succeeds. A final status should summarize the result, while the individual field retains the reason it needs attention.

Add ValidationProvider to the component tray and name it valFields for this example:

PropertyExample value
Target""
ErrorText""

Use the full lesson for the owner’s initialization code and its complete layout.

Properties#

Contract defaults are shown below. Where a new control has a different Designer starting value, that value is listed separately.

Target

StringDefault: ""

Name of a visual control in this form whose custom validation message is being edited. Empty means no target selected.

ErrorText

StringDefault: ""

Custom error for Target, at most 256 characters on one line. Empty clears that target's custom error.

Events and parameters#

Replace control with the object’s Name when creating a handler. ByRef arguments may be changed by your handler; ByVal arguments report an input value.

No events are declared.

Methods#

No methods are declared in this component’s built-in metadata. Use its documented properties and events; do not infer APIs from a similarly named control in another framework.

Source baseline 20f4bfed6b · Build manifest