var validations = new Array(); validations[0] = new Validation("reg_user_Title", "", "MultiSelect", "N", "", "", "", "", "") validations[1] = new Validation("reg_user_FirstName", "", "Alpha", "Y", 50, "", "", "Ingresa tu nombre", "") validations[2] = new Validation("reg_user_LastName", "", "Alpha", "Y", 50, "", "", "Ingresa tu apellido", "") validations[3] = new Validation("reg_user_Address1", "", "", "Y", 100, "", "", "Ingresa tu dirección", "") validations[4] = new Validation("reg_user_Address2", "", "", "", 100, "", "", "", "") validations[5] = new Validation("reg_user_EmailAddress", "", "Email", "Y", 256, "", "", "Ingresa tu correo electrónico", "") validations[6] = new Validation("reg_user_ConfirmEmail", "", "", "Y", 256, "", "", "Ingresa tu correo electrónico", "ValidateConfirmEmail") validations[7] = new Validation("reg_user_City", "", "", "Y", 100, "", "", "Ingresa tu ciudad", "") validations[8] = new Validation("reg_user_State", "", "MultiSelect", "Y", "", "", "", "Ingresa tu estado", "") validations[9] = new Validation("reg_user_Zip", "", "Numeric", "Y", 10, 5, "", "Ingresa tu código postal", "") validations[10] = new Validation("reg_user_Gender", "", "MultiSelect", "Y", "", "", "", "Ingresa tu sexo", "") function ValidateConfirmEmail() { var emailID = document.getElementById("reg_user_EmailAddress"); var confirmID = document.getElementById("reg_user_ConfirmEmail"); if (confirmID && emailID) { if (emailID.value !="" || confirmID.value != "") { if (!IsValidEmailAddress(confirmID.value)) { return ErrMsg_ValidType; } else if (emailID.value != confirmID.value) { return 'Confirma tu correo electrónico'; } } } return ""; } function ValidateConfirmPassword() { var passwordID = document.getElementById("reg_user_Password"); confirmID = document.getElementById("reg_user_ConfirmPassword"); if (confirmID && passwordID) { if (passwordID.value !="" || confirmID.value != "") { if (passwordID.value != confirmID.value) { return ErrMsg_PasswordVerify; } } } return ""; } function ValidateBirthDate() { var mon = document.getElementById("reg_user_DOBMonth"); var day = document.getElementById("reg_user_DOBDay"); var year = document.getElementById("reg_user_DOBYear"); if (mon.value.length == 0 || day.value.length == 0 || year.value.length == 0) { return 'Ingresa tu fecha de nacimiento'; } if (mon.value.length>0 || day.value.length>0 || year.value.length>0) { var dt = mon.value + "/" + day.value + "/" + year.value; if (!isDate(dt)) return ErrMsg_ValidType; } return ""; }