Data Entry Validation Function
Hi,
Been busy doing some work in the north of Malaysia. Helping a friend of mine starting up his Wood Plastic Composite factory. I coined it as a Save The Forest and Love Your Environment Industry. The factory transforms unwanted Rice Husks (which farmers normally burn) into multi-purpose Wood. In the midst of that, I spared some time in improving an important utility, i.e. the Data Entry Validation Function.
Data Entry Validation is important if we’re developing serious apps. We can use TABLES, For..Do and If..Or loops for this purpose. But in my opinion, using LUA is the easiest, fastest and efficient way. You’ll be surprised on how easy it is after looking at the codes.
I’m posting this function as a standalone example just in case some AMS users want to reference it for other apps. We’ll embed this Validation function in the Email Address Book in the next topic.
This example shows 4 types of validation:
1. Alphabet Entries only
2. Numeric Entries only
3. Alphanumeric Entries only
4. Email Entries only
The Email Validation is the most complex to do. It uses lots of String Actions and ElseIfs. There are many ways to do it. Anyhow, there might be REGEX functions out there done by AMS users just waiting to share with us. In the mean time, I’ll share what I have.
Please Login or Register to download this file.
You can modify the functions according to your Validation needs. Just add or delete the characters in the LUA array to fit specific patterns that you fancy.
Side note:
I spent my spare time improving the Email Validation function at a blue-coloured wooden shack restaurant by a very clean beach at Pulau Sayak lagoon. Nice place, nice food and my 3G internet connection was very speedy there. Love it.







