Manish Shukla
Manish Shukla

Reputation: 71

Janrain custom js validation for registration

I need to validate custom field in janrain registration page which is I am configured in drupal and using as registration. Want to validate using janrain validator functions.

Upvotes: 0

Views: 193

Answers (1)

Gobinath Mallaiyan
Gobinath Mallaiyan

Reputation: 26

Since your requirement is to do in Drupal, we have few option to achieve this.

  1. Custom Drupal Module by leveraging to jquery-validate
  2. Just Include jQuery-Validate & your custom JS via Theme
  3. Plugin to client side validation module

For Custom Module (or) Theme implementation, you would required to have your own JS that would do the necessary validation.

In this JS we need to define bind a new handler for the event onCaptureRenderComplete. Some thing like

// Bind Validation.
janrain.events.onCaptureRenderComplete.addHandler(handleValidation);

Once a handler is attached you just define the the custom function handleValidation defined which would take care of validations.

You can check the complete validation JS @ Sample Validation JS

Upvotes: 1

Related Questions