Unverified Commit 262b33cb authored by Roland Denis's avatar Roland Denis
Browse files

Making email mandatory in job offer form

parent a8180760
Pipeline #4019 canceled with stages
......@@ -171,8 +171,11 @@ class FormData(object):
errors.description = 'Description manquante'
# Checking email
if self.email and not re.match(r'^[^@]+@[^@]+\.[^@]+$', self.email):
errors.email = 'Adresse mail invalide'
if self.email:
if not re.match(r'^[^@]+@[^@]+\.[^@]+$', self.email):
errors.email = 'Adresse mail invalide'
else:
errors.email = 'Adresse mail manquante'
# Checking job type
if self.job_type not in JOBOFFER_TYPE:
......
......@@ -69,8 +69,8 @@
<span class="error">{{ '{{errors.employer}}' }}</span>
</p>
<p>
E-mail <br>
<input type="email" name="email" value="{{ '{{form.email}}' }}">
E-mail* <br>
<input type="email" name="email" value="{{ '{{form.email}}' }}" required>
<span class="error">{{ '{{errors.email}}' }}</span>
</p>
<p>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment