Well, the place to begin is to begin at the beginning. (It's a very good place to start.) You've come to the right site, but this question seems to be a little too broad to be able to answer.
First, note that JavaScript and Java are actually 2 separate languages. We do have a forum for JavaScript here (
HTML/JavaScript). If your question is about JavaScript validation, you might try asking there.
Now, about validation. Your post was a little bit vague on the system architecture. What type of system is the financial program? Is it another web page, a web application (deployed as a WAR file), or an enterprise application (deployed as an EAR file)? If the first one, then the JavaScript forum is really where you belong. If one of the latter two, validation is ideally done in two places -- once on the web page (through JavaScript) to provide feedback to the user, and once on the server (be it the web server or the application server). Once we get the environment established, we might be able to help you a little bit better with the specifics of your question.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.