close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Dupliate fields

Thread began 6/15/2009 3:27 am by shaun.emphasis324757 | Last modified 6/17/2009 6:48 am by Ray Borduin | 2707 views | 5 replies |

shaun.emphasis324757

Dupliate fields

I'm still fairly new with validation toolkit. I'm creating a registration page and I want to ensure that the email field and the username field are both unique. What is the easiest way to achieve this? Could it be somehow using the 'like' validate tool??

I have also purchased the registration solution pack as this gives me a tool to 'disect' but I'm still unable to work out how it is achieved in this pack!! I'm assuming it might have something to do with the 'checknum rows' line that is in the Server Validation!

Can you point me in the right direction please!! If it is something more complicated like with using the 'checknum rows' could you please be specific as i'm no programmer.

Thank you in advanced.

Sign in to reply to this post

Ray BorduinWebAssist

The way you would do it is you would add a recordset filtered with the form elements you want to be unique. That way the recordset will either be empty (no repeats) or have a result (repeat).

then you can make sure those recordsets appear before the validation toolkit and use server validation to ensure the number of rows in that recordset is equal to 0.

The exact syntax depends on your server language.

Sign in to reply to this post
Did this help? Tips are appreciated...

shaun.andrews

OK, I am using Php with Mysql so what would be the correct syntax for this??

Sign in to reply to this post

Ray BorduinWebAssist

Use the DW Recordset in simple view. Choose your table and the ID column and use the filter settings provided to filter the recordset with the posted field value.

Sign in to reply to this post
Did this help? Tips are appreciated...

shaun.andrews

Creating the recordset bit makes sense, I'm just unsure how to use validation toolkit to check the number of rows in that recordset is equal to 0.

Sign in to reply to this post

Ray BorduinWebAssist

Look at the code for the recordset created. One line will set a variable equal to the number of rows returned.

Use that variable when you apply webassist server validations server behavior and validate using number validation minimum:0 maximum:0. If it returns anything but zero server validation will fail.

Server validation can validate any value, not just form elements.

Sign in to reply to this post
Did this help? Tips are appreciated...

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

Content

rating

Layout

rating

Ease of use

rating

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...