On the 23rd October, three members of the tombola Platform team travelled over to Newcastle for an evening session organised by JavaScript North East (@jsnortheast). After free pizza and beer, Damian Nicholson (@damian) gave an interesting talk on the perils of form validation. He warned against the common practice of disabling the ‘submit’ button until a form validates. He narrated a real life scenario in which a user, failing client side validation due to some edge case violation, was prevented from moving forward. Better, in this case, to allow the submission and let server-side validation kick in. Damien concluded his talk by presenting a React– based library that avoids some of the pitfalls of previous plug-ins (e.g. premature validation, no integration with server validation etc.).

 

 

Damien’s talk got me thinking about how we validate forms here at tombola. On the client side, we rely on a JQuery based plug-in called ‘validate’. On the server side, we validate incoming form data via annotations on our view model classes. Bog standard stuff for ASP.NET, really. No one in our team even uses React. So why was this talk useful to us? Well, as a company, we are moving away from one large web app towards a service oriented architecture. As we break individual services out of our monolith, we increasingly find ourselves needing lightweight, JS apps to use/administer them. So, the idea of a client side validation framework that supports communication with the server (amongst other nice features) is very interesting to us. Thanks Damien 🙂

 

 

Incidentally, Campus North hosted this event, and it really is an interesting place (the pictures in this blog were taken in the building). There were private study booths mocked up as old fashioned telephone boxes, toilets decorated with cartoon strips, motivational messages chalked above the coffee machines. And it sits right next to a lovely little cafe called Flat Caps. I recommend a visit to both, if you get the chance.