Skip to content
Permalink
Browse files

Update _template.twig

  • Loading branch information...
davidhellmann committed Jul 29, 2019
1 parent af7ca8c commit 76b20c6dd51a610db9e87bae5908af304a561ef7
Showing with 5 additions and 0 deletions.
  1. +5 −0 generators/app/templates/___src/templates/craftcms/_atoms/input/_template.twig
@@ -33,6 +33,11 @@
{# -- Merge Default with Options -- #}
{% set opt = opt is defined ? defaults|merge(opt) : defaults %}

{% set pattern = opt.pattern %}
{% if opt.type == 'email' %}
{% set pattern = opt.pattern ?? "^[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$" %}
{% endif %}

{# -- Modul -- #}
{% if opt.type and opt.name and opt.label %}
<div class="{{ opt.cn }}

0 comments on commit 76b20c6

Please sign in to comment.
You can’t perform that action at this time.