urejen html za datum, pripravljen za urejanje v js
This commit is contained in:
+2
-2
@@ -42,9 +42,9 @@ function preveriEmail() {
|
||||
|
||||
function preveriTelefon (){
|
||||
const vrednost = telefon.value.trim();
|
||||
const vzorec = /^0\d{2} ?\d{3} ?\d{3}$/; //https://www.w3schools.com/js/js_regexp.asp
|
||||
const vzorec = /^0\d{2} ?\d{3} ?\d{3}$/; //https://www.w3schools.com/js/js_regexp.asp, spet ^pomeni zacetek besedila, obvezno 0, \d{2} za ničko obvezno dve stevili (d- digit), ?- neobvezen presledek, \d{3} 3 stevila, $ zakljucek besedila
|
||||
if (!vzorec.test(vrednost)) {
|
||||
napakaTelefon.textContent = "Vnesite veljavno telefonski številko.";
|
||||
napakaTelefon.textContent = "Vnesite veljavno telefonsko številko.";
|
||||
telefon.classList.add("napacno");
|
||||
return false;
|
||||
}
|
||||
|
||||
+5
-2
@@ -52,8 +52,11 @@
|
||||
<fieldset class="field_rezervacija">
|
||||
<legend>Podrobnosti rezervacije:</legend>
|
||||
|
||||
Datum obiska
|
||||
<input type="date" id="datum-obiska" name="datum-obiska" required>
|
||||
<label for="datum-obiska">Datum obiska</label>
|
||||
<div class="vnos_rezervacija">
|
||||
<input type="date" id="datum-obiska" name="datum-obiska" required>
|
||||
<span class="sporocilo_napake" id="napaka-datum"></span>
|
||||
</div>
|
||||
Ura obiska
|
||||
<input type="time" id="ura-obiska" name="ura-obiska" min="10:00" max="21:00" required>
|
||||
Število oseb
|
||||
|
||||
Reference in New Issue
Block a user