Target
Name of a visual control in this form whose custom validation message is being edited. Empty means no target selected.
Combine built-in validity with a business rule attached to a named control.
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:
| Property | Example value |
|---|---|
Target | "" |
ErrorText | "" |
Use the full lesson for the owner’s initialization code and its complete layout.
Contract defaults are shown below. Where a new control has a different Designer starting value, that value is listed separately.
TargetName of a visual control in this form whose custom validation message is being edited. Empty means no target selected.
ErrorTextCustom error for Target, at most 256 characters on one line. Empty clears that target's custom error.
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.
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.
20f4bfed6b · Build manifest