Skip to content

Commit

Permalink
feat(copier.yaml): add author and email fields with validation
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Aug 21, 2023
1 parent 6253d18 commit f087b99
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ project_license:
- GPLv3
- None

author:
type: str
help: What is your name?
validator: >-
{% if not (author | regex_search('^[a-zA-Z][a-zA-Z ]+$')) %}
author must start with a letter, followed one or more letters or spaces
{% endif %}
github_username:
type: str
help: What is your GitHub username?
Expand All @@ -57,6 +65,15 @@ github_username:
github_username must start with a letter or digit, followed one or more letters, digits or dashes in lowercase only
{% endif %}
email:
default: "{{ github_username }}@"
type: str
help: What is your email?
validator: >-
{% if not (email | regex_search('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$')) %}
email must be a valid email address
{% endif %}
github_repo_name:
default: "{{ project_name }}"
type: str
Expand Down

0 comments on commit f087b99

Please sign in to comment.