You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

This validator checks that a field is a valid URL.

Usage

 The annotation must be applied at method level.

Parameters

ParameterRequiredDefaultNotes
messageyes field error message
keyno i18n key from language specific properties file
messageParamsno additional params to be used to customize message - will be evaluated against the Value Stack
fieldNameno field name under validation
shortCircuitnofalseif this validator should be used as shortCircuit
urlRegexno defines regex to use to validate url
urlRegexExpressionno defines regex as expression to validate url, expression will be evaluated against current stack to get proper regex
typeyesValidatorType.FIELDEnum value from ValidatorType. Either FIELD or SIMPLE can be used here

Examples

UrlValidator usage example
@UrlValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
  • No labels