Forum
Form input patterns
Can perch form errors handle input patterns, for example:
<perch:input type="text" id="shipping_postcode" label="Postal code" class="form-control" title="Postcode must begin with CH or LL" pattern="^(CH|LL).*$">
If not, please consider this a feature request :)
It does, yes. What problem are you seeing?
I'm also trying to use a pattern, it prevents the form submitting if the pattern isn't matched but it doesn't display my error. Is
type="pattern"
the correct attribute to use in the error?The attribute for the regex pattern error should be
type="format"