Validate Form Input on the Client Side

If you are developing Web pages that provide HTML forms to the user, then you may notice that many times invalid data gets submitted. To reduce such invalid input, you can easily implement some basic validation at the client side. This way you will save some extra hits to the Web server. For example, if your Web page contains a login dialog, then you can easily check for the minimum length of the login or certain invalid characters in the login string.

Here is a sample HTML page that contains a login form that validates at the client side for the minimum number of characters in a login and password string. From the “ONCLICK()” event of the OK button, the Validate() method is called, which then calls the submit method of the form if the login information is correct.

 Form Validation Demo
Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

technology leadership

Why the World Needs More Technology Leadership

As a fact, technology has touched every single aspect of our lives. And there are some technology giants in today’s world which have been frequently opined to have a strong influence on recent overall technological influence. Moreover, those tech giants have popular technology leaders leading the companies toward achieving greatness.

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job