close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

My automatic, wizard generated form 'Registration', has a postcode window that will only allow 2 digits, Australia needs 4. I have gone into the data table and changed from integer to varch and made it 15, But on the last 4 attempts at creating thi

Thread began 5/28/2013 4:45 pm by dee | Last modified 6/06/2013 5:43 pm by dee | 1928 views | 11 replies

CraigRBeta Tester

Ok, I am a little bit confused, as the validation rule you posted looks like a number validation, not a postcode validation.

Did you try commenting out or removing the validation for the postcode to get the form to work properly ?

Here's how server validation works...

When the form is posted, the value from the (eg postcode) field is passed into a function (lets say WAValidateZC) and tested against certain parameters, which, if it conforms, creates no errors.
If all of the fields to be tested generate no errors, the form is processed, otherwise the error is flagged and the user is directed back to the original page.

There is a standard webassist function for validating zip code called WAValidateZC and this can be accessed by going to server behaviors and choosing add, then webassist->validation->server validations.
The problem is the standard WAValidateZC validation only checks for 5 and 9 digit us, Canadian and UK postal code formats.
I needed to validate for AUS and NZ formats too, but the function can't cope with this at present, and you cannot do it via the server behaviour interface. you need to code by hand.

So, here's what I did...
To start with, I created a standard postcode validation using the Webassist validation for Zip Code by adding this server behavior via the interface.
I then tested it thoroughly using various US and UK postcodes/zipcodes

The validation functions are on a page called wavt_scripts_php.php which is stored in the webassist/form_validations folder.
I created a modified version of the function to take in a 5th parameter, (AUS/NZ postcode), called it WAValidateZCNew and added it to the bottom of the wavt_scripts_php.php page and saved the page.
(I posted the code for this in another thread)
I then found the line on my page which was validating the code and made 2 changes to it
1 I renamed the function to WAValidateZCNew
2 I added the extra parameter 'true' to the line.

so as an example...
$WAFV_Errors .= WAValidateZC(((isset($_POST["postcode"]))?$_POST["postcode"]:"") . "",true,true,true,true,true,13);


$WAFV_Errors .= WAValidateZCNew(((isset($_POST["postcode"]))?$_POST["postcode"]:"") . "",true,true,true,true,true,true,13);

With these changes in place, my form successfully validated all of the postcode formats

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...