Closed ratcashdev closed 10 years ago
Which other attributes might be interesting? The only attribute I can think of is pattern, which is missing indeed. As for the other attributes: I thought I'd already taken care of required, min and max - did I miss a special case? Here's a working example:
@NotNull @Min(1886) @Max(2014) public int getYear() { return car.getYear(); }
@Size(min=1, max=30, message="{nameMaxLen}")
corresponding to
<input maxlength="30" />
but as I just figured, there is no minlength
attribute in HTML5. the closest solution is using <input pattern=".{1,30}" title="#{msg[nameMaxLen]}"/>
@Required
is indeed working. I did not spot this at first, because I had included the attribute manually myself.
Since AngularFaces can already process JSR-303 annotations and pass these to angular, how about enhancing the tag's attributes with: