MOD10 Validation

Would be a nice to have for a column validation rule.

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

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.

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

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

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.

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.

Thanks for all the great support/replies on this topic.

I’ve now added that into a free plugin. See http://www.servoyguy.com/servoy_compone … pro_plugin

Looks great. Thanks so much!