Help please for form validation (with php, ajax and jquery)
The error is that sends output to email: when required as the field is 8 characters
Where is the error, please?
- $(document).ready(function() {
- $(function(){
- $("#myform").validate({
- submitHandler: function(form) {
- $(document).ajaxStart(function() {
- $('#loading').show();
- $('#result').hide();
- }).ajaxStop(function() {
- $('#loading').hide();
- $('#result').fadeIn('slow');
- });
- },
- rules: {
-
- Nombre: {
- required: true,
- minlength: 8
- }
- }
- });
- });
- $('#myform').submit(function() {
- $.ajax({
- type: 'POST',
- url: $(this).attr('action'),
- data: $(this).serialize(),
- success: function(data) {
- $('#result').html(data);
- }
- })
-
- return false;
- });
- })
MIKEPIANIST