I have a lookup-field that needs to have a value, although under some circumstances there is no options. In these cases, the user should not be able to create a new list-item.
Problem is that when the lookup field does not have any available options, the form seem to disregard from the fact that is has no value and the item gets created with an empty value in the field anyway.
Is there a simple idiomatic way to force the field to actually have a valid value?
I'm working as programmer, defining stuff in xml and code. No designer-stuff.