Tag Archives: jQuery Validator

MVC3, Entity Framework, jQuery… Everything example

How would you like to have a project that has these features? Dependency Injection Entity Framework 4.0 with POCO Inversion of Control with Castle The IResult jQuery jQuery Ajax Posts jQuery Custom Css jQuery Validation Mocking with Rhino Mocks MVC 3/Razor MVC Annotation Based Validation What I call the Repository Pattern Unit Tests – Integration [...]

Leave a comment Continue Reading →

jQuery Validation with Multiple Checkboxes

So this one is done on request and because I am a kind of merciful god I will grant this request. For those bullet point programmers: The working demo can be found here The code can be easily downloaded Now when I say validation, I mean the validation plugin. and this example is built using [...]

Leave a comment Continue Reading →

jQuery Validator: Build Rules and Messages Dynamically

Ok so here’s your typical code for the jQuery Validator: jQuery(ELEMENT_FORM).validate({ errorLabelContainer: ELEMENT_ERROR_DIV, wrapper: ‘div’, rules: { textboxEmailAddress: { required: true, email: true } }, messages: { textboxEmailAddress: { required: ERROR_EMAIL_ADDRESS_REQUIRED } }, …. As you can see, the elements like “textboxEmailAddress” are hard coded in there which means if that name changes in the [...]

Leave a comment Continue Reading →

jQuery Validator: Adding a Custom Method

File this one under “Posted to take less time to find the answer”: If you’re using jQuery Validator and the built in validation methods just aren’t cutting, there’s a way you can add your own method to the validator itself. For this example let’s start some pretend time. Uhg I said pretend time not f–ked [...]

Leave a comment Continue Reading →