themeteorchef / base

A starting point for Meteor apps.
http://themeteorchef.com/base
MIT License
689 stars 253 forks source link

Validate Input of a Form Against Another Collection #211

Open beauremus opened 7 years ago

beauremus commented 7 years ago

I would like to validate the input of a form against the existence of common fields in another collection. Any suggestions on how to accomplish this?

themeteorchef commented 7 years ago

Hi @beauremus. If I understand correctly, you could do this using a combination of jQuery validation's validator.addMethod function and a method that calls to the server to check the inputted value against some data from a collection. Does that make sense?

beauremus commented 7 years ago

I need some time to dig into it but I think so.