You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example: what if you want to check username availability, can you make an asynchronous call to the server to check the availability inside the 'validationValue' element?
The code below doesn't work because Meteor.call is asynchronous. What is best practice here?
ReactiveForms.createElement({
template: 'UserNameInput',
validationEvent: 'keyup',
validationValue: function(el, clean, template) {
var v = $(el).val();
console.log(v);
Meteor.call('isUsernameAvailable', v, function(err, result) {
if (err) {
Meteor.Error('could not check username availability.');
}
return result;
});
}
});
The text was updated successfully, but these errors were encountered:
Question.
For example: what if you want to check username availability, can you make an asynchronous call to the server to check the availability inside the 'validationValue' element?
The code below doesn't work because
Meteor.call
is asynchronous. What is best practice here?The text was updated successfully, but these errors were encountered: