I have implemented a system using the ANTLR parser in Java for the backend of our software (frontend in Angular 2+). While the connection between the frontend inputs and backend logic is working well, there is a concern that users may input data with typos leading to server internal errors.
I am exploring options to validate user input before it is sent to the server, potentially providing suggestions based on the grammar file. I have come across examples utilizing ANTLR with JS / TS, but I prefer not to transition all the way from Java to JS and keep sensitive logic restricted to the backend.
Any recommendations on how I could create helpful files derived from my grammar file to at least verify validity?
Appreciate any insights you can offer.