Predefined character classes such as \s, \d or \w, when escaped for use in bean validation annotations on Java side (i.e. \\s, \\d or \\w) are not escaped on the AS3 generated validation annotations (and thus validation with FormValidator fails).
Example:
Java side
============
// 'Hi' followed by a repetition of words separated by a space; "Hi dude" should work
@Basic
@NotNull(message="cannot be null")
@Pattern(regexp="^Hi( \\w)*$", message="invalid format")
private String message;
generated AS3 side
============
[NotNull(message="cannot be null")]
[Pattern(message="invalid format", regexp="^Hi( \w)*$")]
public function get message():String {
return _message;
}
When entering a string such as "Hi dude" FormValidator fails validation.
Sample project (including code above) based on org.graniteds.archetypes:graniteds-tide-spring-jpa-hibernate:1.1.0.GA available here:
http://enjoii.free.fr/example1.tar.gz
Steps to reproduce bug:
1. tar -zxf example1
2. cd example1
3. mvn clean install
4. cd webapp
5. mvn jetty:run-war
6.
http://localhost:8080/example1/example1.swf
7. login with admin/admin
8. enter "Hi dude" in message text field
=> textfield goes red with "invalid format" message
Thanks.