@NetBoomIT You are not limited to JS; You may also do that with the required attribute defined at the given input fields and probably do the tweak with CSS as to the red warnings.
Well, I learn you are using a front-end framework (comprising CSS, HTML, & JS) which (Bootstrap) here makes the designing simpler since we only have to include Bootstrap files and mention Bootstrap’s predefined class names for our webpage elements and they will be styled automatically through Bootstrap; am new to this start- up!
True, you must back it up with server-side validation to be secure.
But it’s not a bad idea to have in-page client side validation too for the convenience of the user.
It is a lot easier these days with modern browsers supporting various input types, the required and pattern attributes, so you no longer need js to do this unless you need support for old browsers.