1

I have a safeCracker form that takes in users e-mail address. I would like to validate that a user that has already registered is not registering for a second time.

Anyway to accomplish this?

1

The Safecracker supports some of the CodeIgnitor's validation rules (http://ellislab.com/expressionengine/user-guide/modules/safecracker/#rules-my-field-name) but it doesn't support the validation rule for "is_unique".

I 'm still wondering this rule is available in CodeIgnitor but not in EE which uses CodeIgnitor.

There may be 2 ways to achieve it.

1) You can add new rule for "is_unique" with form validation file "/system/codeigniter/system/libraries/Form_validation.php". But I am not sure it would work for EE as never tried it.

2) An extension can be developed using the hook "safecracker_submit_entry_start", in this extension, check for unique email address and throw the error if already registered. I am sure about this approach and it will work.

I hope, it would help you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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