MOD10 Validation

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

MOD10 Validation

Postby jbader » Wed Feb 13, 2008 6:50 pm

Would be a nice to have for a column validation rule.
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

mod 10 javascript

Postby Thomas Parry » Wed Feb 13, 2008 7:40 pm

I took a little detour today and explored the modulus 10 or Luhn algorithm.

I found this gem in Javascript no less:

http://www.wallpaperama.com/forums/java ... -t497.html

Now it may not be perfectly formed (it is embedded in html after all). But the guts could be re-used.

I also found this site with a Java version - that maybe you could try...

http://saloon.javaranch.com/cgi-bin/ubb ... 4&t=000007

(About mid-way down. There is another version there also).

Is there a reason for wanting it built-in as a utility method rather than bake your own?

Tom
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada

Actually I have one

Postby jbader » Wed Feb 13, 2008 7:45 pm

Hey Thanks Tom...I actuallyhave one though that I wrote awhile back. I just thought it would be nice if Servoy included one. If someone wants a MOD10 method, please e-mail me.
Last edited by jbader on Thu Feb 14, 2008 2:22 pm, edited 2 times in total.
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Postby david » Wed Feb 13, 2008 7:46 pm

Servoy doesn't have any data validators -- these are left up to the developer. For mod 10:

http://www.teklynx.com/support/faq/faq_130.html
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1726
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Postby pbakker » Wed Feb 13, 2008 8:39 pm

Just create 1 global method with this validation and attach a globalMethod column validator (under column properties in the dataprovider dialog) to the column and set the method name to you global method: done!

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

data validators

Postby Thomas Parry » Wed Feb 13, 2008 9:50 pm

Servoy does have some rudimentary data validators. And I just finished the Servoy webinar to day on that very subject which explained a lot of the existing ones (very nicely thank you!).

However I do get your point: there are no complex validators for some "common" or "popular" types of data such as the credit card. The email validator is useful though not complex for example.
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada

Postby goldcougar » Thu Feb 14, 2008 5:50 am

keep in mind servoy does have the Regular Expression column validator, which can very effeciently do most validations. For example, credit card. Consider using http://regexlib.com to find good regular expressions. The site currently has almost 2,000 searchable regular expressions, as well as an online regex tester.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
goldcougar
Servoy Expert
 
Posts: 682
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Thanks

Postby jbader » Thu Feb 14, 2008 2:21 pm

Thanks for all the great support/replies on this topic.
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Postby goldcougar » Mon Mar 03, 2008 8:27 pm

I've now added that into a free plugin. See http://www.servoyguy.com/servoy_compone ... pro_plugin
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
goldcougar
Servoy Expert
 
Posts: 682
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Great

Postby jbader » Mon Mar 03, 2008 8:52 pm

Looks great. Thanks so much!
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests