[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Feature Request: Formatted Field with range property or regular expression  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

Hi,

would it be possible to add a kind of range property to validate the input like [0..100] or ]50..90[, or maybe it would be less effort to enable regular expressions?

regards
Markus
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5538
Offline

Hi,

hmmm, I currently do not like both things that you propose (but of course I undertstand what you want to do):

(A.) regular expressions should be used for format checks, for range checks they are "sub-optimal" from my perspective. And they are in conflict with the type definitions. E.g. you specify "date" as format, and then you have an additional regular expression: the expression must be in sync with the date-format (which is language/country specific) etc.

(B.) direct "from-to" range...: yes, this would be quite easy to add. The question is: what is next? "from-to-but not", "some-of", "..." - so there is a set of client rules you may want to apply.

So, in general I prefer (B.) but this would require some kind of rule description which is quite generic. We can discuss how this could look like. Please add your ideas.

Björn

PS: for the time being, you may use USERHINT in order to tell the user exactly what he/she should enter, or you may use FLUSH for crtical fields - you need to check the data on server side anyway once again (if you do it the clean way...).

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

ok, I understand, maybe there's a possibility to get along with JSR 303 reference Impl. Hibernate Validator? I don't know how your property binding works under the hood, maybe you can integrate/generate those annotations?
Staying at Swing maybe http://www.jgoodies.com/freeware/validationdemo/ would be a solution?

I'm sure this is no short term solution, but maybe this could be a way to integrate "standard" validation to Cpt. Casa?

...by the way I can live with the "flush" option ;-)

regards
Markus
[WWW]
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team