<p>If the fields are marked as required in your field layout, then they should fail validation even on the front-end, so it sounds like a bug to me.  Can you send a database backup as well as the template code you're using for the form over to support@buildwithcraft.com?</p>

<p><strong>Update</strong></p>

<p>The issue was that if your entries were set to be disabled by default, then Craft won't run any validation on them.  Just made a change so that if you use the <a href="https://github.com/pixelandtonic/guestentries" rel="nofollow">latest Guest Entries</a>, you'll have an additional plugin setting to enable/disable validation on a per section basis, regardless of the default status of the entry.</p>

CC BY-SA 3.0
2014-07-06T12:22:01.430Z
Quick question: I take it Craft not enforcing validation on Draft entries is something you want t kep that way. I guess both oprions make sense here, depending of your conception of draft entriess.
Jérôme Coupé
CC BY-SA 3.0
2014-07-06T15:28:33.250Z
Right... drafts are basically "works on progress" and you might want to save them before they are even completed.
Brad Bell
CC BY-SA 3.0
2014-07-07T08:27:53.047Z
Hey Brad, quick question again. How can I display validation errors on the from end form ? Is the Edit in my original post the best way to do it ?
Jérôme Coupé
CC BY-SA 3.0
2014-07-07T15:31:59.363Z
Yup... if you want to get all of errors for the entry, then that'll work fine.
Brad Bell
CC BY-SA 3.0
2014-07-02T15:13:22.387Z
2014-07-03T07:55:17.087Z
2014-07-03T07:55:17.087Z
Brad Bell
<p>This might be a bit of a Noob question but here I go:</p>

<p>Using Guest Entries on a site and cannot figure out how to make certain fields required. Those fields are marked as required in the CP but, when using Guest Entries, entries are submitted even when required fields are not filled in.</p>

<p>I can easily implement a front-end validation but I would like the validation to happen on the back-end before saving the entry as well.</p>

<ul>
<li>Should this happen automatically, am I missing something ?</li>
<li>Do I have to create a validation "manually" and if so, how ?</li>
</ul>

<p><strong>EDIT:</strong></p>

<p>After updating the plugin, this is how I displayed validation errors:</p>

<pre><code>{% if entry.errors is defined %}
    {% for errorField, error in entry.errors %}
        {% for errorMessage in error %}
        &lt;ul class="form-errors"&gt;
            &lt;li&gt;{{ errorField }} - {{ errorMessage }}&lt;/li&gt;
        &lt;/ul&gt;
        {% endfor %}
    {% endfor %}
{% endif %}
</code></pre>

<guest-entries><required>
Make fields required when using Guest Entries
# Make fields required when using Guest Entries

(Asked by: username_0 on 2014-07-02)

This might be a bit of a Noob question but here I go:
Using Guest Entries on a site and cannot figure out how to make certain fields required. Those fields are marked as required in the CP but, when using Guest Entries, entries are submitted even when required fields are not filled in.
I can easily implement a front-end validation but I would like the validation to happen on the back-end before saving the entry as well.

Should this happen automatically, am I missing something ?
Do I have to create a validation "manually" and if so, how ?

EDIT:
After updating the plugin, this is how I displayed validation errors:
{% if entry.errors is defined %}
    {% for errorField, error in entry.errors %}
        {% for errorMessage in error %}
        
            {{ errorField }} - {{ errorMessage }}
        
        {% endfor %}
    {% endfor %}
{% endif %}

**Tags:** guest-entries, required


---

## 1 answers

### Answer by username_1 on 2014-07-02. Score: 4 | Accepted answer

If the fields are marked as required in your field layout, then they should fail validation even on the front-end, so it sounds like a bug to me. Can you send a database backup as well as the template code you're using for the form over to support@buildwithcraft.com?

**Update**

The issue was that if your entries were set to be disabled by default, then Craft won't run any validation on them. Just made a change so that if you use the [latest Guest Entries](https://github.com/pixelandtonic/guestentries), you'll have an additional plugin setting to enable/disable validation on a per section basis, regardless of the default status of the entry.

> **Comments:**
> **username_0**: Quick question: I take it Craft not enforcing validation on Draft entries is something you want t kep that way. I guess both oprions make sense here, depending of your conception of draft entriess.  
> **username_1**: Right... drafts are basically "works on progress" and you might want to save them before they are even completed.  
> **username_0**: Hey Brad, quick question again. How can I display validation errors on the from end form ? Is the Edit in my original post the best way to do it ?  
> **username_1**: Yup... if you want to get all of errors for the entry, then that'll work fine.  

---

