You are here

function hook_redirect_validate in Redirect 7.2

Same name and namespace in other branches
  1. 7 redirect.api.php \hook_redirect_validate()

Perform redirect validation before a redirect is created or updated.

This hook is invoked from redirect_validate(), after a user has has finished editing the redirect and is submitting it. It is invoked at the end of all the standard validation steps.

To indicate a validation error, use form_set_error().

Note: Changes made to the $redirect object within your hook implementation will have no effect. The preferred method to change a redirect's content is to use hook_redirect_presave() instead. If it is really necessary to change the redirect at the validate stage, you can use form_set_value().

Parameters

$redirect: The redirect being validated.

$form: The form being used to edit the redirect.

$form_state: The form state array.

See also

redirect_validate()

Related topics

1 invocation of hook_redirect_validate()
redirect_validate in ./redirect.module
Validate a redirect.

File

./redirect.api.php, line 209
Hooks provided by the Redirect module.

Code

function hook_redirect_validate($redirect, $form, $form_state) {
}