Commit 455889cb authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Modificado validações do tipo do arquivo nas substituições

parent 441488e2
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
} }
}); });
$("input[type='file']").on("change", function () { $("input.pdf").on("change", function () {
if(this.files[0].type.split('/')[1] == "pdf") { if(this.files[0].type.split('/')[1] == "pdf") {
if(this.files[0].size > 20000000){ if(this.files[0].size > 20000000){
alert("O arquivo possui o tamanho superior a 2MB!"); alert("O arquivo possui o tamanho superior a 2MB!");
...@@ -227,6 +227,21 @@ ...@@ -227,6 +227,21 @@
$(this).val(''); $(this).val('');
} }
}); });
$("input[name='anexoComprovanteBancario']").on("change", function () {
if(this.files[0].type.split('/')[1] == "pdf"
|| this.files[0].type.split('/')[1] == "jpeg"
|| this.files[0].type.split('/')[1] == "jpg"
|| this.files[0].type.split('/')[1] == "png") {
if(this.files[0].size > 20000000){
alert("O arquivo possui o tamanho superior a 2MB!");
$(this).val('');
}
}else{
alert("O arquivo não é do tipo Correto!");
$(this).val('');
}
});
}); });
function manterPlano(checkBox){ function manterPlano(checkBox){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment