Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JQuery+Validate]Sprawdzanie pola SELECT
ghastblood
post
Post #1





Grupa: Zarejestrowani
Postów: 360
Pomógł: 12
Dołączył: 17.09.2009
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Witam
mam taki skrypt
  1. $(document).ready(function(){
  2. $("#rejestracja").validate({
  3. rules: {
  4. username: {
  5. required: true,
  6. minlength: 4
  7. },
  8. password1: {
  9. required: true,
  10. minlength: 5
  11. },
  12. password2: {
  13. required: true,
  14. equalTo: "#password1"
  15. },
  16. email1: {
  17. required: true,
  18. email: true
  19. },
  20. email2: {
  21. required: true,
  22. email: true,
  23. equalTo: "#email1"
  24. }
  25. },
  26. messages: {
  27. username:{
  28. required: "'.$locale['5000'].'",
  29. minlength: "'.$locale['5001'].'",
  30. },
  31. password1:{
  32. required: "'.$locale['5002'].'",
  33. minlength: "'.$locale['5003'].'"
  34. },
  35. password2:{
  36. required: "'.$locale['5004'].'",
  37. equalTo: "'.$locale['5005'].'"
  38. },
  39. email1:{
  40. required: "'.$locale['5006'].'",
  41. email: "'.$locale['5007'].'"
  42. },
  43. email2:{
  44. required: "'.$locale['5006'].'",
  45. email: "'.$locale['5007'].'",
  46. equalTo: "'.$locale['5009'].'"
  47. }
  48. },
  49. success: function(label) {
  50. label.html(" ").addClass("sprawdzony");
  51. }
  52. });
  53. });


jak do niego mogę dodać sprawdzenie pola select
mam tam 2 opcje "tak" i "nie" i chcę żeby opcja "tak" była required a opcja "nie" wyświetlała błąd
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 19:18