VDaemon PHP Library | VDaemon Extension | Table of Contents
You may need to display an error message or highlight some text at or near the location where an input validation error has occurred. The vllabel custom tag provides you an easy yet powerful way to accomplish this. Each vllabel tag references one or more validators (vlvalidator or vlgroup tags). The logical "AND" is applied to the vlvalidator references to determine how the vllabel tag will be rendered on a page.
<vllabel form="formName" class="cssStyle" errclass="cssStyle" errtext="errorText" validators="validatorName[, validatorName ...]"> Default text </vllabel>
Specifies form name to which this label belongs. This attribute is not requiered if label tag located inside vdaemon form.
Sets the CSS style for the default text. Default text will be displayed in place of vllabel tag if each validator referenced in validators attribute has not reported an error.
Sets the CSS style for the ErrText attribute text. If the ErrClass attribute is not defined, the CSS style defined by the Class attribute will be used instead.
The ErrText attribute text will be displayed in place of the vllabel tag if any validator referenced in the validators attribute has reported an error. If the ErrText attribute is not defined, the default text will be used instead.
The validators attribute contains a set of references to one or more vlvalidator or vlgroup tags whose states will determine how the vllabel tag will be rendered. If any of the validators has reported an error the ErrText attribute text with ErrClass attribute CSS style will be displayed in place of vllabel tag, otherwise the default text with Class attribute CSS style will be displayed.