Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By vit137 on
By default drupal checks to see if a mandatory profile field is blank or not. I want to be able to validate a profile entry against a value already stored in a table at account creation time.
I have the profile field and table, but I can't find where I can add my own validation without customizing the profile module, which I don't want to have to do. Is there a simple hook to use to do this?
Thanks to anyone who can provide a pointer.
Comments
Think I'll answer my own question
Thanks to me that is.
Here's how I did it. Make a module. Then take advantage of user_hook() to grab the variable under the $edit variable. Then check against your table or whatever.