ianmartorell / meteor-accounts-ui-bootstrap-3

accounts-ui package with Bootstrap 3 and localization support
150 stars 109 forks source link

Access submitted all fom values #212

Open taviroquai opened 8 years ago

taviroquai commented 8 years ago

Hi,

How do I access all form fields on the validate function in the example below? Thanks.

Accounts.ui.config({
    requestPermissions: {},
    passwordSignupFields: "USERNAME_ONLY",
    extraSignupFields: [
        {
            fieldName: 'first_name',
            fieldLabel: 'First Name',
            inputType: 'text',
            visible: true,
            validate: function(value, errorFunction) {
              if (!value) {
                errorFunction("First name is required");
                return false;
              } else {
                return true;
              }
            }
        }
]});