3

I have a custom content type which has a url alias pattern of [node:type]/[node:title].

How can I validate the node form in order to prevent the url alias from becoming [node:type]/[node:title]-0 in case the same title is used somewhere else.

Basically, I would like to prevent the node from saving, and display an error message if the url alias will end up having a "-0" at the end.

1 Answer 1

2

How about using the Unique field module for this? Here is a quote about the module's project page:

This module performs additional validation when a node is created or updated by a user to require that a node's title, author, language, and CCK fields are unique within a given context.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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