We're updating the issue view to help you get more done. 

Provide configuration option for setting default language used in @ScriptAssert

Description

Currently the used script language must be set using the lang attribute with each usage of the @ScriptAssert constraint. As often it makes sense to use one and the same language in all constraints of an application, it seems useful to provide a global configuration option for setting a default language:

1 2 3 4 5 6 Validator validator = Validation .byProvider( HibernateValidator.class ) .configure() .defaultScriptAssertLanguage("ruby") .buildValidatorFactory() .getValidator();

The mandatory attribute ScriptAssert#lang)() would be required to have a default value, allowing to omit it when using the constraint.

Environment

None

Status

Assignee

Unassigned

Reporter

Gunnar Morling

Components

Affects versions

5.0.0.CR1

Priority

Major