Closed (fixed)
Project:
Drupal core
Version:
6.13
Component:
profile.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2009 at 14:58 UTC
Updated:
9 Feb 2012 at 20:30 UTC
I have a couple of custom required fields in my registration form and it seems like these fields are still going through and being accepted when they are left as is or blank.
However, if you login and try to change it via your edit profile page it works alright though, returning an error that the field is required.
Any advice? Thank you.
Comments
Comment #1
savinsur commentedI have the same issue. I have made a list of choices and the reg goes through even though its set to
required. I have tried making the first choice " -- " as well as " - select - "
PLEASE HELP!
Comment #2
halloffame commentedUse the Validation API module to validate the field. Make sure the form ID of that field is
user_registerto invoke it upon registration.Comment #3
savinsur commentedOK, Thanks! will try. I just want to know, is this issue a bug or was the validation API required
all along?
It would be good know why the required checkbox on the list now does not work.
Comment #4
halloffame commentedEven with the use of Validation API the field will still go through if you will not use the form ID I mentioned above. This isn't a bug. You just don't add " -- " or " - select - " as one of the option and set it as its pre-defined (default) values. You need validation for that or the value " -- " or " - select - " will still pass. There are two ways for validating field, one is to write your own validator or use the validation API module (the easier way).
As for the required checkbox it is a known core bug. Check here and here is the solution
Here are some few other stuff that will help you in validating forms.
Validation API
Validating forms is much easier with regular expression:
Regular Expression Basic
Regular Expression Library
More advanced stuff:
http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...
http://api.drupal.org/api/function/hook_user/6
Comment #5
kars-t commentedHi
I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.
Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.