Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Field validation with directive

 
Roberto Alves Pereira
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cabecalho.html




Exercicio.jsp




Exercicio19.js





Exercicio19.jsp





rodape.html


project (eclipse) https://www.dropbox.com/s/9nctwcu0y2aoacr/Exercicio19.rar

Server validation always invalid by the Directive because?

Note: This is an exercise in college
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch Roberto. :) I could not understand what your doubt is. Can you explain in some more detail as to exactly what is the problem that you are facing?
 
Roberto Alves Pereira
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 - Run the application
2 - Enter number 1 (beginning)
3 - Digita number 2 (end)

Server validation if number1 <0 | | number2> 20 return false

The program never returns true
The program comes in is always returns false


Sorry for english mistakes, I am beginner
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't apologize. I can tell by your name that you are of Hispanic descent. :)
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your method is :



I debugged and saw that it is written to return false if the numbers are either <0 or > 21. How can you expect it to work otherwise? :)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic