Hi,

I try to create a rule to check if an input of a content type is empty for authenticated user. If the input is empty, I want to stop the content creation and display an error message.

I try to do that with rules with out success... The event is "Before saving", I chose several conditionals and add an action : "display a message on the site". The message has error type, but the rule do not stop the creation, I've got "Content created" and "Error the input xxxxx is empty"

To stop the process I tried to use Rules Forms Stop, but when I chose the event before submiting, I can't access to my input field, data selector shows me User and Site.... I would prefer node.

If you have any idea feel free to answer me, sorry for my english.

Comments

TR’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

I don't see why you want to do this - if you want to make certain fields in your content type required, then just configure your content type to make them required. If you want them to be conditionally required, hook_form_alter() the node edit form to add your conditions. Rules is really the wrong tool for this.