Folder in the Trash

Share This Post

GIGO…Garbage In Garbage Out. This is a term that can sometimes be associated with data. Let’s face it, data is the lifeblood of any organization. In today’s marketplace, data analytics and data mining help organizations meet the needs of their clientele. So…that data needs to be protected to the utmost. This is where, as developers, we have a role to play.


Before I address the developer’s role, let’s chat about the database administrator’s (dba) role. It is their role to protect the data at all cost. Most good dba’s take this very seriously…and rightly so. As a developer, I sometimes don’t look at it that way and feel that it is a pain. “I mean, come on…just give me admin rights to the database and do a select asterisk so I can build cool apps!” I have said variations of this at times throughout my career. That quote is probably making dba’s skin crawl. They have a highly important job…let’s make it easier as developers. In comes data validation.

Data Validation Location

Data validation is performed in two main locations…server-side and client-side. I want to speak to the client-side in this post. This is the first line of defense and the easiest location to tend to things. Most data validation involves forms.

Let’s be real here…show of hands…how many of you have filled out a form, say a registration form, and put in bogus information just to get the form filled out and in the door? I thought so. Once that happens, the data is tainted. Developers can help prevent this.

There are two main ways to accomplish this…1) HTML constraints and 2) programmatic validation with JavaScript and Regular Expressions. I plan on addressing the coding side of things with regular expressions at a later date. For now, I want to speak to HTML constraints.

HTML Constraints

It can go a long way towards data validation when the proper HTML is used to build a form. Let’s say you are asking the end user for a date. HTML5 has a date input type field complete with drop down calendar! I recall building that by hand. That enhancement alone was worth the price of admission for me to HTML5. If the HTML is written with another input type, say a text field, well…you have opened the door to allow the end user to specify any date format they wish…which will lead to errors and possibly a knock on your door from your friendly. neighborhood dba.

Some examples of helpful HTML5 input types are:

  • search
  • email
  • url
  • tel
  • number
  • range
  • date
  • month
  • week
  • time
  • datetime
  • datetime-local
  • color

So make sure you select the proper HTML5 input types and constraints to make the rest of your validation easier.

Happy Coding!

Clay Hess

More To Explore


Demystifying Scrum User Stories Confirmation: Ensuring Quality and Collaboration

One of the key elements of Scrum is the use of user stories to define the requirements of a system or feature from the perspective of the end user. As teams work through the product backlog, it becomes crucial to confirm the user stories to ensure they meet the desired criteria and are ready for development. In this blog post, we’ll explore the concept of Scrum user stories confirmation and its significance in delivering high-quality products.


The Power of Conversations in Scrum User Stories

At the heart of Scrum lies the concept of user stories, which serve as a means of capturing requirements from the perspective of end-users. However, the true power of user stories lies not just in their written form but also in the conversations that take place around them. In this blog post, we will explore the significance of conversations in Scrum user stories and how they contribute to the success of Agile projects.

Do You Want To Boost Your Business?

drop us a line and keep in touch

Scroll to Top

Need help?

Let's have a chat...


Jump Back In!

Here at Webolution Designs, we love to learn. This includes sharing things we have learned with you. 


Begin Your Learning Journey Today!

Come back inside to continue your learning journey.