Follow @endyourif rss Facebook LinkedIn
About Jamie Munro

Welcome to my blog. I have been compiling articles since 2009! Below is a list of every post I've ever created. Some of my major focuses have been compiling the best source of jQuery tutorials on the Internet today. A recent focus of mine is now focusing on creating the best SQL Tutorials for Beginners, Intermediate and Advanced Users. This is a compiliation of all my experience about how to do common SQL commands to optimize for performance. As you might see from the links around here, I've also written and published 5 books. My first and last book are focused around ASP.NET MVC and Web API tutorials. The last book has a big focus on integrating Knockout.js as the MVVM for the front-end code. O'Reilly Media was so interested in Knockout.js that they actually commissioned me to write that book first as it is one of the only books dedicated entirely to this MVVM library. So if you're looking for the best Knockout.js tutorials, I've compiled the best list. My first book, even though it was self published, was on the PHP framework: CakePHP. I used this framework for years and many of my first ever exampes were all focused on CakePHP tutorials that provide so many fantastic PHP examples. There are so many Javascript tutorials out there, but I noticed that one of the things I work on most with Javascript is arrays. With this I've worked hard on compiling a big list of really advanced Javascript array examples. These array examples are amazing including how to group by, get distinct array elements and so many more. I've also dabbled a little bit with Node.js and during those experiments I definitely ran into some common errors like Can't set headers after they are sent, Solving No Access-Control-Allow-Origin with Node js and Express, and Uncaught ReferenceError: require is not defined. With these common errors I've compiled a list of Node.js tutorials that help solve these problems, but more importantly getting you started with the basics.

Validate an email address in JavaScript

Published on Jan 26, 2020

This is my least favorite topic; validating email addresses. There are hundreds of examples using regular expressions that are all slightly different and all have there own quirks with them.

If validation must be done, I suggest only doing this on the client-side. Ideally the server-side performs email validation by sending an actual email that includes a unique link to validate the email is valid.

But if JavaScript is a must, here is the best one I've found.

Unit Testing Data Validation with MVC

Published on May 11, 2015

You've added some data validation and you want to test it out in action. The data validation can be standard data annotations, custom data attributes, or data validation implemented via an IValidatableObject. This article will explore how to leverage the ValidationContext to execute and assert the test results.

Removing Data Validation from MVC Controllers

Published on May 6, 2015

You require custom data validation that cannot be accomplished via the built-in data annotation validation attributes - or - your data validation requires access to multiple properties in your model. Let's explore how to leverage the IValidatableObject.

Unbind Model Validation in CakePHP

Published on Mar 28, 2009

Have you found yourself wanting to remove validation on a specific field in a specific form?  Yes?  Excellent, you found the right place.

If you haven't had the need for this, a great example of where you would want to accomplish this would be in a users edit form.  Normally in CakePHP we would encrypt the password, especially if you are using the AuthComponent, so we wouldn't want the password prefilled on our form.  Instead, we'll make it blank and place a note underneath that says "Only enter a password if you wish to change it".

The above shouldn't be difficult, however, when you go to use the form, you will get some unexpected results.  I keep getting a message saying that I must enter a password, because I had setup validation on that field for the registration process.  Below is a simple solution to this problem.