bloc referral

If you are interested in learning to code with a mentor, try bloc and get $100 off.

Wednesday, August 13, 2014

Some times things just can't be engineered: The email validation saga ends

I briefly wrote a blog post how I defeated the email validation on the server side and the possible idea on created my first Ruby gem to do so in the future. I also through in a quick picture of my success in creating client-side validation in JS, I felt pretty proud till I realized I was going to suffer the same emails string pains I did with Rails.

It is surprising that there are so few blog post/resources on working with validating emails, luckily I found a lot more examples in JS then I did in Ruby. It seems there are not many people creating modals using bootstrap to take multiple emails separated by commas.

I received the recommendation to use the jQuery Validator, which was easily implemented once I learned how to reference the proper id's. I had limited jQuery experience prior and most was copy and pasted, without much realization of what I was doing. I did a lot of catching up in learning jQuery thanks to treehouse and can now say I have  working knowledge of it. I was surprised to learn that jQuery is basically a powerful form of CSS for Javascript and not much more.

Even after learning what was needed to know I discovered, with the help of multiple coworkers, that the jQuery Validator does not work well with Twitter-Bootstrap. I was unaware, but not fit to explain, there are many limitations with bootstrap and many advanced features in front-end development are limited because of it.

Bootstrap is a great tool for individuals looking to get a decent front-end design quickly and focus more on the back-end program. I have quickly realized there will always be a point where tough decisions will be made. There is a Bootstrap Validator, but similar to many other tools, it does not handle multiple emails in a string.

Bootstrap prevents the validator to activate until a valid email is entered, which is the opposite functionality in this JSfiddle. This is absolutely mind-boggling, but forced me and the team to make decision to move on. There are just too many factors, the fact this is a modal, using bootstrap, and the need to validate a string of emails separated by commas.

It came to a point where no more time could be sunk into this feature and the executive decision was made to move-on without client-side validations. If this was a personal project, I would of walked away sooner, but the determination to implement all features a requested caused me to spend more than time than needed on this.

This was an experience I will not forget and for future failures I hope to find a solution, or realize a stopping point sooner. I stand here defeated but with the advice, you can't engineer everything.



No comments:

Post a Comment