diff options
Diffstat (limited to 'documentation/components/components-fields.asciidoc')
-rw-r--r-- | documentation/components/components-fields.asciidoc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/documentation/components/components-fields.asciidoc b/documentation/components/components-fields.asciidoc index 1415f98e73..77a308a3bb 100644 --- a/documentation/components/components-fields.asciidoc +++ b/documentation/components/components-fields.asciidoc @@ -170,7 +170,11 @@ class MyValidator implements Validator<String> { Since [interfacename]#Validator# is a functional interface, you can often simply write a lambda expression instead of a full class declaration. There is also an [methodname]#withValidator# overload that creates a -validator from a boolean function and an error message. +validator from a boolean function and an error message. If the application requires +more sophisticated validation diagnostics (e.g. locale-specific), there is a +method [methodname]#withValidator#, which uses a boolean function and an [classname]#ErrorMessageProvider#. +The [classname]#ErrorMessageProvider# can compose diagnostic messages based on the locale of the validation +and the source component value, which are provided with the [classname]#ValueContext#. [source, java] ---- |