how can i validate an input against an entry already present in my collection
You might be able to use wix-data hooks. See the Example: No Database Duplicates. If this is not what you are looking for, you will need to explain in more detail what you are trying to accomplish.
Thanks Yisrael, for quick reply
I have a form and one of the input fields is "key" i want when the user enters the key input it should first get validated from the collection where i have stored all my keys and then only the submit button work
I mean the key that user is entering should be present in the my collection only then the submit button work else user should get a message of invalid key
@Samarth Kaushik You can use the beforeInsert() hook as demonstrated in the Example: No Database Duplicates. In the hook, you can do whatever checking/validation that you want. If the check passes, then insert, if not then don't do the insert.