Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation of Forms

 
Paddy Joshi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to validate a form. In which i need to validate if user entered text where number is required. i come to know about isNaN () method. but it will validate floating numbers also and i want integers only. moreover how can i enable a text input only when checkbox is enabled
what i did was ( for number validation)


please help me with this ... thnks in advance ...
 
Prasad Krishnegowda
Ranch Hand
Posts: 665
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try using regular expressions..
 
Prasad Krishnegowda
Ranch Hand
Posts: 665
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paddy Joshi wrote:how can i enable a text input only when checkbox is enabled

On click of the checkbox, call one function, based on the value you get from checkbox(whether its checked or unchecked), enable/disable a text box. What difficulty are you facing here?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your logic looks fine for me except .(dot) in your string . remove that!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic