ianmartorell / meteor-accounts-ui-bootstrap-3

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

errorMessage() for extraSignupFields validation #91

Open reneverschoor opened 9 years ago

reneverschoor commented 9 years ago

I've added a few extra fields using extraSignupFields. In Accounts.validateNewUser() I do some validation on these extra fields. If a field is invalid, I return false from validateNewUser(). This works, but what I would like to do is to show a message in the signup dialog, explaining what's wrong. How can my app use the equivalent of Accounts.loginButtonsSession.errorMessage('Thou shall enter a value') ?

ianmartorell commented 9 years ago

I properly documented how to do this on the README, but I'm having difficulties getting the actual values written to the user documents. For some reason it just doesn't write them. Does this work for you?

switheyw commented 8 years ago

As far as I can tell (not all that far) the extra-fields key has been removed? As of jul 14, 2016 only the following keys exist.

"Accounts.ui.config = function(options) { // validate options keys var VALID_KEYS = ['passwordSignupFields', 'requestPermissions', 'requestOfflineToken', 'forceApprovalPrompt'];