[SOLVED] Set fild from optional to required

Hello, I´m new in METEOR, the thing is I have a Schema with a field which is optional and only it’s rendered if the user choose an specific option, so at that moment the field will be show up and change from optional to required, How can I do that? Thanks

You’ll need to use a custom validator function for the field, check the other field has a certain value and if this field is empty and return the string required from the custom validator function.

ok, but how can I check the other field value (sorry if I´m doing an obvious question I´m really new in METEOR), also the function has to be reactive because the value of the field can change several times so the optional/required field will change his state every time the other field changes the value, thanks for the answer

Hello, I resolve the problem already, thanks for the help, admin can close this topic greetings