forked from cmc-iacc/IACC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidar.js
More file actions
26 lines (24 loc) · 1.08 KB
/
validar.js
File metadata and controls
26 lines (24 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function validar() {
let id_vuelo = document.getElementById('id_vuelo').value;
let origen = document.getElementById('origen').value;
let destino = document.getElementById('destino').value;
let fecha = document.getElementById('fecha').value;
let plaza_disponibles = document.getElementById('plaza_disponibles').value;
let precio = document.getElementById('precio').value;
if (id_vuelo === '' || origen === '' || destino === '' || fecha === '' || plaza_disponibles === '' || precio === '') {
alert('Por favor completa todos los campos');
return false;
}
return true;
}
function validarhotel() {
let nombre = document.getElementById('nombre').value;
let ubicacion = document.getElementById('ubicacion').value;
let habitacion = document.getElementById('habitacion').value;
let tarifa = document.getElementById('tarifa').value;
if (nombre === '' || ubicacion === '' || habitacion === '' || tarifa === '') {
alert('Por favor completa todos los campos');
return false;
}
return true;
}