Closed
Description
Hi!
A new htmlPattern
option was added (by this commit symfony/symfony@6f9eda9 so it exists since 2.1) to the Regex constraint and it's not in the docs.
And there is a pitfall (thats why this option exists) that I think the doc should mention... php's PCRE patterns are not fully compatible with the pattern HTML5 attribute e.g. JavaScript does not support \A and \Z anchors so you're stuck with using the caret (^) and dollar ($) for this purpose.
And one more thing from this commit symfony/symfony@7503ec9
Pattern is also ignored if match=false since the pattern should then be reversed before application.