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 shajiuddinse on
Hi,
I need to implement Insufficient Data Validation on fields.
For example: special characters checking, numbers checking etc
How can I do it? Please help
Regards
Comments
By using hook_form_alter you
By using hook_form_alter you can add your validation function on your desired form.
Thanks for reply, Please tell
Thanks for reply,
Please tell me name of file where I have to do make changes
and I need to check realistic data from field
for example if I am putting on last name field '& & $ $ ** @@' then these kinds of special character remove from field automatically
Please help
You would need to create a
You would need to create a custom module and would need to copy the above maintained code in its .module file. You can change the code as per your need so that it filters the submitted value.
Thanks for reply. Please tell
Thanks for reply.
Please tell a resource/example to do this as I am not understanding with your sayings
Regards
You can follow giving link
You can follow giving link steps to create your custom module
http://drupal.org/node/416986
If you use Drupal 7, there is
If you use Drupal 7, there is a field validation module which could solve such issue:
http://drupal.org/project/field_validation
Chinese drupal tutorials Think in Drupal