Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.34 KB

TPJHotLabel-ValidateURL.md

File metadata and controls

33 lines (20 loc) · 1.34 KB

ValidateURL property

Project: Hot Label Component.

Unit: PJHotLabel.

Class: TPJHotLabel

Applies to: ~>2.0

property ValidateURL: Boolean;

Description

This property determines whether the URL stored in the component is validated or not.

Set this property to True to cause any value assigned to the URL property to be validated. When ValidateURL is False no URLs are validated. Note that setting this property to True causes the current URL to be validated immediately.

URLs are validated only by examining the protocol and checking it is supported. Valid protocols are:

  • http://
  • https://
  • mailto:
  • file:
  • ftp://

If validation fails a EPJURLError exception is raised. If this exception is raised while setting ValidateURL to True the default URL is stored in the URL property.

When the CaptionIsURL and ValidateURL properties are both True, assigning text to the Caption property also causes the text to be validated. This is because setting the Caption property in this case automatically updates the URL property.

The default property value is True.