Page 1 of 1

MOD10 Validation

PostPosted: Wed Feb 13, 2008 6:50 pm
by jbader
Would be a nice to have for a column validation rule.

mod 10 javascript

PostPosted: Wed Feb 13, 2008 7:40 pm
by Thomas Parry
I took a little detour today and explored the modulus 10 or Luhn algorithm.

I found this gem in Javascript no less: ... -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... ... 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?


Actually I have one

PostPosted: Wed Feb 13, 2008 7:45 pm
by jbader
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.

PostPosted: Wed Feb 13, 2008 7:46 pm
by david
Servoy doesn't have any data validators -- these are left up to the developer. For mod 10:

PostPosted: Wed Feb 13, 2008 8:39 pm
by pbakker
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!


data validators

PostPosted: Wed Feb 13, 2008 9:50 pm
by Thomas Parry
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.

PostPosted: Thu Feb 14, 2008 5:50 am
by goldcougar
keep in mind servoy does have the Regular Expression column validator, which can very effeciently do most validations. For example, credit card. Consider using to find good regular expressions. The site currently has almost 2,000 searchable regular expressions, as well as an online regex tester.


PostPosted: Thu Feb 14, 2008 2:21 pm
by jbader
Thanks for all the great support/replies on this topic.

PostPosted: Mon Mar 03, 2008 8:27 pm
by goldcougar
I've now added that into a free plugin. See ... pro_plugin


PostPosted: Mon Mar 03, 2008 8:52 pm
by jbader
Looks great. Thanks so much!