LassoScript Utility
Basics Browse Detail

[Valid_URL]

Tag Link [Valid_URL] Category Utility
Type Substitution Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Any
Output Type Boolean Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x

Description

[Valid_URL] checks the format of a URL parameter. If the parameter appears to be a valid URL then True is returned.

This tag does not check whether the specified server is available. Use [Include_URL] to perform a live check of a remote server.

The optional -Protocol parameter allows a protocol to be specified such as HTTP, HTTPS, MAILTO, FTP, etc. Only URLs which reference that protocol will be returned as valid.

Syntax

[Valid_URL: 'URL']

[Valid_URL: 'URL', -Protocol='Protocol']

Parameters

Required Parameters
URL The URL to be checked
Optional Parameters
-Protocol Optional protocol to check for. If specified only URLs with this protocol will be returned as valid.

Examples

To check whether a URL is valid:

Use the [Valid_URL] tag. The following example checks whether a URL referencing the Web server at www.example.com is valid.

[Valid_URL: 'http://www.example.com/Lasso/Admin.LassoApp']

True