I would like to pass some parameters to the newly registered method (username_availability in this example).
The parameter I want to pass is not a static one, such as min:3, instead it will be a dynamic value, for example additional info about the current user.
I was thinking to something like this, but it's not working. The user.email value is not passed:
In the readme file the documentation for the registerAsync method is the following
Dominar.Validator.registerAsync('username_availability', function(username, attribute, parameters, passes) {.....}
I would like to pass some parameters to the newly registered method (username_availability in this example). The parameter I want to pass is not a static one, such as min:3, instead it will be a dynamic value, for example additional info about the current user.
I was thinking to something like this, but it's not working. The user.email value is not passed:
fieldA { rule: 'username_availability:' + user.email }
Can you please explain me how I can do that, if possible ? thx