0

I have the jsf input text as double type in pojo class. I want to validate that field with empty check. By default in page load the value comes as 0.0 in the text field. Once I clear the value (i.e empty value) and click submit button, the text field is not getting validated.

Any help would be appreciated.

The Student
  • 27,520
  • 68
  • 161
  • 264
user3488165
  • 13
  • 1
  • 4

1 Answers1

2

If you want it to appear empty than you can change from double (primitive) into Double (Object)

and set the field to required="true"

Daniel
  • 36,833
  • 10
  • 119
  • 200