[bv-dev] BV 2.0 - Add constraints?

Emmanuel Bernard emmanuel at hibernate.org
Wed Oct 26 03:02:00 EDT 2016


On Wed 16-10-19 12:09, Gunnar Morling wrote:
>* Another interesting one is support for Unicode surrogate pairs (it's
>mentioned several times, though I'm not sure whether that was not one and
>the same person, given I've *never* heard about requests for it before).
>The issue is that there are characters with a code unit greater than what
>can be stored in two bytes. These are represented by "surrogate pairs",
>causing for instance "𠮷".length() to return 2 and not 1 as one may expect.
>Hence values given in @Size need to take that into account. I feel people
>are best off with a custom validator addressing this case, but I'd be
>curious to hear what others think. We may explore support in the RI.

About surrogate pairs, I am not at all familiar with it but could it be
resolve with a provider specific global option to handle surrogate pairs
or not.
I suppose your reluctance to support it is because it will take extra
CPU time for the common case correct?


On another subject, one of the proposal was support for EL. Should we
leave it to the providers? Or embrace it?


More information about the beanvalidation-dev mailing list