Also, you'll want to add new routes to params.router, which is a special router just for plugins, and doesn't interfere with existing routes 😄
UNSOLVED How to add custom form validation?
Daniel Kück last edited by
I want to add a custom field, asking for the age, in the registering process.
<label for="age" class="col-lg-4 control-label">[[register:age]]</label>
<input class="form-control" type="number" min="16" placeholder="[[register:age_placeholder]]" name="age" id="age" required/>
<span class="register-feedback" id="age-notify"></span>
But I can't see where to configure the red validation boxes and the text depending on the validation error.
I actually have the very same problem - any ideas?
The validation code is here https://github.com/NodeBB/NodeBB/blob/master/public/src/client/register.js. You can write a plugin to validate your own inputs.