ashais13 Posted April 29, 2010 Report Share Posted April 29, 2010 Kā ar html panākt to lai minimālai ievadāmie simboli ir 5.. - Zinu ka maksimālo var uzlikt ar maxlength, bet lkm tāds minlength nav..- Vsmz man nedarbojas, ja ievadu. Quote Link to comment Share on other sites More sharing options...
Code Posted April 29, 2010 Report Share Posted April 29, 2010 Nu diez vai tā sanāks. Nāksies pārbaudīt ar JS vai arī servera pusē. Quote Link to comment Share on other sites More sharing options...
indoom Posted April 29, 2010 Report Share Posted April 29, 2010 tāpēc, ka nav tāda atribūta. Var izmantot JS, kas pārbauda, un tad php pusē,- ja nav pieci simboli, tad prasi, lai raksta vairāk. Quote Link to comment Share on other sites More sharing options...
briedis Posted April 29, 2010 Report Share Posted April 29, 2010 Kā ar html panākt to lai minimālai ievadāmie simboli ir 5.. - Zinu ka maksimālo var uzlikt ar maxlength, bet lkm tāds minlength nav..- Vsmz man nedarbojas, ja ievadu. ar html to nepanāksi, tas jādara ar javascript. Es ceru, ka tu saproti, ka php pusē tik un tā ir jāpārbauda garumi, jo html/js ierobežojumus var elementāri apiet. <script> <script> function testLength(e){ if(e.value.length < 5 || e.value.length > 30){ alert("Par īsu vai par garu"); } } </script> <input type="text" onblur="testLength(this);"/> Quote Link to comment Share on other sites More sharing options...
ashais13 Posted April 29, 2010 Author Report Share Posted April 29, 2010 (edited) Skaidrs.. - Viss tgd ok.. - Paldies. Man jau nevajadzēja neko sarežģītu vnk vārdu ievadīšanai.. ;) Edited April 29, 2010 by ashais13 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.