Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## com.opensymphony.xwork2.validator.annotations
Annotation Type UrlValidator

    @Target(value=METHOD)
    @Retention(value=RUNTIME)
    public @interface UrlValidator

This validator checks that a field is a valid URL.

     @UrlValidator(message = "Default message", key = "i18n.key", shortCircuit = true)

Optional Element Summary
`String` | `fieldName` The optional fieldName for SIMPLE validator types.
`String` | `key` The message key to lookup for i18n.
`String` | `message` The default error message for this validator.
`String[]` | `messageParams` Additional params to be used to customize message - will be evaluated against the Value Stack
`boolean` | `shortCircuit` If this is activated, the validator will be used as short-circuit.
`ValidatorType` | `type` The validation type for this field/method.
`String` | `urlRegex` Defines regex to use to validate url
`String` | `urlRegexExpression` Defines regex as an expression which will be evaluated to string and used to validate url

### message

    public abstract String message

  The default error message for this validator. NOTE: It is required to set a message, if you are not using the message key for 18n lookup!

  Default:
    ""

### key

    public abstract String key

  The message key to lookup for i18n.

  Default:
    ""

### messageParams

    public abstract String[] messageParams

  Additional params to be used to customize message - will be evaluated against the Value Stack

  Default:
    {}

### fieldName

    public abstract String fieldName

  The optional fieldName for SIMPLE validator types.

  Default:
    ""

### shortCircuit

    public abstract boolean shortCircuit

  If this is activated, the validator will be used as short-circuit. Adds the short-circuit="true" attribute value if `true`.

  Default:
    false

### type

    public abstract ValidatorType type

  The validation type for this field/method.

  Default:
    com.opensymphony.xwork2.validator.annotations.ValidatorType.FIELD

### urlRegex

    public abstract String urlRegex

  Defines regex to use to validate url

  Default:
    ""

### urlRegexExpression

    public abstract String urlRegexExpression

  Defines regex as an expression which will be evaluated to string and used to validate url

  Default:
    ""

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.