Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Closed
Labels
Milestone
Description
Hi!
A newhtmlPattern option was added (by this commitsymfony/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 thepattern 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 commitsymfony/symfony@7503ec9
Pattern is also ignored if match=false since the pattern should then be reversed before application.