jakartaee / jakartaee/faces

add message attribute to f:validateLongRange etc.

Open
#759 12 comments 0 reactions 0 assignees View on GitHub
Component: Validation/Conversion Priority: Minor Type: Improvement
Dominant language
Java
Stars
127
Forks
59
Avg merge
23h
Merged PRs (30d)
7

Description

It seems very unnatural for me to not have a "message" or "validatorMessage"
attribute on the following tags:

f:validateDoubleRange
f:validateLength
f:validateLongRange
f:validateBean
f:validateRegex
f:validateRequired
f:validator

while I can set a _single_ validatormessage on, e.g. the h:inputText tag alone.

If I have multiple validators on one tag, I want to tell the user which
validation failed with a custom message. This is not possible currently
without creating an own validator that handles the different cases, although
all the required components do already exist and just need to be chained
together.
#### Environment
Operating System: All
Platform: All
#### Affected Versions
[2.0]

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the listed f:validateDoubleRange, f:validateLength, f:validateLongRange, f:validateBean, f:validateRegex, f:validateRequired, and f:validator tags alongside h:inputText's validatorMessage behavior. The requested result is a custom message on each validator tag so multiple validators can report which validation failed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.