Help - Meteor Error Handling

In an HTML form, I have an input field. I need the value of the input to be what I decide it to be. E.g. I want the value to be only “abc”. If the user writes anything else in the field, then he/she should get an alert/warning/pop-up from the server. How can I code this in Meteor’s JavaScript?

There are MANY ways to do this.
Of course that is possible!

The simplest way would be to do this on the client, in a template, either Blaze event map or in a React component. You also need to make sure to check the input on the server too, to make sure that a malicious user hasn’t bypassed any client checks.

You should probably check out some of the demo apps, they all go into way more depth than this!

Do you have any code/example/tutorial I can read?

meteor create --example todos

https://www.meteor.com/todos
^ it will build an example app - you can review all the code yourself!
If you’ve got any questions, search the forums and google for an answer, if you can’t find it - just jump on here and ask.

Thanks, I’ll do just that :slight_smile:

I can’t seem to get it work! I appreciate any help.