Proposal, copied from comments in T2759.
XML - current implementation:
<constraint> <validator name="numeric" argument="--range 1-65535"/> </constraint>
XML - new implementation:
<constraint> .. validator node 1 ... <errorMessage>This is bad</errorMessage> </constraint> <constraint> .. validator node 2 ... <errorMessage>This is bad</errorMessage> </constraint>
Only once <validator> should be supported per <constraint>
<constraintGroup> .. validator node 1 ... .. validator node 2 ... <errorMessage>This is bad</errorMessage> </constraintGroup>
All constraints in <constraint> are run as logical OR, all validators under the <constraintGroup> node are run with a logical AND.
Having both constraint and constraintGroup will OR both together.