I need to add some form validation to the register.liquid file in the Dawn theme. As of now a new user can be created using any character. I can have my first name be [email removed] and it will accept it as a new user. I simply want a condition that checks to make sure the first and last names only include letters and not numbers or symbols.
For reference here is a piece of the Dawn theme Liquid code from templates/customers/register.liquid
{%- form ‘create_customer’, novalidate: ‘novalidate’ -%}
{%- if form.errors -%}
{{ 'templates.contact.form.error_heading' | t }}
-
{%- for field in form.errors -%}
- {%- if field == 'form' -%} {{ form.errors.messages[field] }} {%- else -%} {{ form.errors.translated_fields[field] | capitalize }} {{ form.errors.messages[field] }} {%- endif -%} {%- endfor -%}