1$(document).ready(function(){ 2 3 (function($) { 4 "use strict"; 5 6 7 jQuery.validator.addMethod('answercheck', function (value, element) { 8 return this.optional(element) || /^\bcat\b$/.test(value) 9 }, "type the correct answer -_-"); 10 11 // validate contactForm form 12 $(function() { 13 $('#contactForm').validate({ 14 rules: { 15 name: { 16 required: true, 17 minlength: 2 18 }, 19 subject: { 20 required: true, 21 minlength: 4 22 }, 23 number: { 24 required: true, 25 minlength: 5 26 }, 27 email: { 28 required: true, 29 email: true 30 }, 31 message: { 32 required: true, 33 minlength: 20 34 } 35 }, 36 messages: { 37 name: { 38 required: "come on, you have a name, don't you?", 39 minlength: "your name must consist of at least 2 characters" 40 }, 41 subject: { 42 required: "come on, you have a subject, don't you?", 43 minlength: "your subject must consist of at least 4 characters" 44 }, 45 number: { 46 required: "come on, you have a number, don't you?", 47 minlength: "your Number must consist of at least 5 characters" 48 }, 49 email: { 50 required: "no email, no message" 51 }, 52 message: { 53 required: "um...yea, you have to write something to send this form.", 54 minlength: "thats all? really?" 55 } 56 }, 57 submitHandler: function(form) { 58 $(form).ajaxSubmit({ 59 type:"POST", 60 data: $(form).serialize(), 61 url:"contact_process.php", 62 success: function() { 63 $('#contactForm :input').attr('disabled', 'disabled'); 64 $('#contactForm').fadeTo( "slow", 1, function() { 65 $(this).find(':input').attr('disabled', 'disabled'); 66 $(this).find('label').css('cursor','default'); 67 $('#success').fadeIn() 68 $('.modal').modal('hide'); 69 $('#success').modal('show'); 70 }) 71 }, 72 error: function() { 73 $('#contactForm').fadeTo( "slow", 1, function() { 74 $('#error').fadeIn() 75 $('.modal').modal('hide'); 76 $('#error').modal('show'); 77 }) 78 } 79 }) 80 } 81 }) 82 }) 83 84 })(jQuery) 85})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.