close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Server Validation - Restrict Content

Thread began 1/07/2013 8:15 am by Ian S | Last modified 1/08/2013 12:45 pm by Ian S | 3576 views | 5 replies |

Ian S

Server Validation - Restrict Content

Hi

I have setup a Server Validation to restrict the content of a field. The reason for this is that the field defines the page name and URL and I need to prevent pages being called Gallery or Images as it would mess the .htaccess file up.

However, even though the behaviour is set as exact match it still fails validation if someone creates a page called 'Saturdays Gallery' for example, so its like its using the 'Includes' operator rather than 'Exact'

Is this a bug or am I doing something wrong?

Cheers
Ian

Sign in to reply to this post

Jason ByrnesWebAssist

the restrict content validation looks at each word individually.

it is intended to restrict specific words from being used in the entry.

using the includes validation type would look within a word:
"thegalery"

would fail the includes validation type, but not exact validation.

Sign in to reply to this post

Ian S

OK, Jason. Thanks. That makes sense.

Is there a way to achieve what I want using the WA Server Validations?

Basically - if someone entered the work Gallery that would be a fail but if someone entered the word Image Gallery that would be OK.

Cheers
Ian

Sign in to reply to this post

Ian S

Hi Jason,

I've hand coded some validation to get around my problem so it's no longer a pressing issue, but it would be good to know if there is anything I can do with the server validations to achieve being able to restrict a word being used in a singular fashion.

Cheers
Ian

Sign in to reply to this post

Jason ByrnesWebAssist

use a regular expression.

here is a regular expression that will restrict galley or Gallery as a singular word, but will allow "gallery123" or "saturdays gallery" to be entered:

/^((?!^((G|g)allery)$).)*$/



you could add Images and images to the restriction as well using:

/^((?!^((G|g)allery|(I|i)mages)$).)*$/
Sign in to reply to this post

Ian S

Ah, Brilliant!

Thank you as always!

Cheers
Ian

Sign in to reply to this post

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