Fork me on GitHub
<< back to Core Developers Guide Edit on GitHub

url validator

Description

URLValidator checks that a given field is a String and a valid URL.

Parameters

Examples

<validators>
    <!-- Plain Validator Syntax -->
    <validator type="url">
        <param name="fieldName">myHomePage</param>
        <message>Invalid homepage url</message>
    </validator>

    <!-- Field Validator Syntax -->
    <field name="myHomepage">
        <field-validator type="url">
            <message>Invalid homepage url</message>
        </field-validator>
    </field>
</validators>

See more details in UrlValidator Annotation