1

I'm building a site with a content type that includes a URI. Is there a module that would prevent a node of that content type being created if the URI it includes is already referenced in an existing node? i.e., so that the site can't have two nodes with the same URI field?

4

There is the Unique Field module that does this.

1

There might be a quicker solution for this. If not, you could use hook_validate() function. For e.g your_module_name_validate(). Inside that function, you could make a query to the database to make sure the the entered url does not match with the existing url in the database for that cck field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.