Re: required attribute of h:inputText consider space as valid value

2006-07-04 Thread Dennis Byrne
No.  You can only do that w/ Converters and Renderers.  Good idea though.

Dennis Byrne

-Original Message-
From: Anthony Hong [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 4, 2006 12:59 AM
To: 'MyFaces Discussion'
Subject: Re: required attribute of h:inputText consider space as valid value

Is it possible to modify current required validation that I do not
have to change anything.

On 7/4/06, Dennis Byrne [EMAIL PROTECTED] wrote:
 Anthony,

 Try writing a custom validator ... something like IsEmptyValidator.

 Dennis Byrne

 -Original Message-
 From: Anthony Hong [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 4, 2006 12:09 AM
 To: 'MyFaces Discussion'
 Subject: required attribute of h:inputText consider space as valid value
 
 h:inputText can set required attribute to true, that means this field
 is a mandatory fields.
 
 But it does not trim string before validation. So an empty space also
 a valid value for input text with required attribute.
 
 How to solve this problem, that I do not have to add trim string
 function in javascript one by one. Any idea?
 
 Thanks
 --
 
 Anthony Hong
 





-- 

Anthony Hong





Re: required attribute of h:inputText consider space as valid value

2006-07-03 Thread Dennis Byrne
Anthony,

Try writing a custom validator ... something like IsEmptyValidator.

Dennis Byrne

-Original Message-
From: Anthony Hong [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 4, 2006 12:09 AM
To: 'MyFaces Discussion'
Subject: required attribute of h:inputText consider space as valid value

h:inputText can set required attribute to true, that means this field
is a mandatory fields.

But it does not trim string before validation. So an empty space also
a valid value for input text with required attribute.

How to solve this problem, that I do not have to add trim string
function in javascript one by one. Any idea?

Thanks
-- 

Anthony Hong





Re: required attribute of h:inputText consider space as valid value

2006-07-03 Thread Anthony Hong

Is it possible to modify current required validation that I do not
have to change anything.

On 7/4/06, Dennis Byrne [EMAIL PROTECTED] wrote:

Anthony,

Try writing a custom validator ... something like IsEmptyValidator.

Dennis Byrne

-Original Message-
From: Anthony Hong [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 4, 2006 12:09 AM
To: 'MyFaces Discussion'
Subject: required attribute of h:inputText consider space as valid value

h:inputText can set required attribute to true, that means this field
is a mandatory fields.

But it does not trim string before validation. So an empty space also
a valid value for input text with required attribute.

How to solve this problem, that I do not have to add trim string
function in javascript one by one. Any idea?

Thanks
--

Anthony Hong







--

Anthony Hong