Empty relation field validation failed with Guest Entries plugin
It looks like it's doing what it should. When you set a field to 'required', you are basically telling the system to not let the entry be saved if you haven't filled out the field you've set 'required' on. That's what this error saying (albeit at a database level). 

Two quick solutions as I see it...


Always make sure you have a default value that can be used for this
field. So you aren't violating the 'required' setting.
Remove the 'required' option from the field in the CP.


EDIT: In the Plugin settings in the CP, have you turned on the Validate Entry lightswitch for the section you are adding to on the front end? Only I've just had a quick play around with the plugin myself, and I get a validation error when I don't submit an entryId for the related section on the front end form. So it looks as though it's working as expected.

I used this to get the errors...

{%for error in guestEntry.getAllErrors %}
    {{ error }}
{% endfor %}


I also just used the default config file guestEntries.php as suggested in the README...

&lt;?php

return array(
    'entryVariable' =&gt; 'guestEntry',
);