Jump to content

How to limit find/search to at least three characters


This topic is 4703 days old. Please don't post here. Open a new topic instead.

Recommended Posts

We currently have a php site connected to a Filemaker database. The website has a simple search box connected to the FileMaker website. The problem is that if a user search for "*" all records will be shown. We do not want the user to be able to do this. Is there any way to set a limit that the search querry has be at least three characters long? Do I set this up in the FileMaker website or in the php code?

Link to comment
Share on other sites

This seems to do it in Filemaker:

@@@*

In PHP you would need to look at regex functions as here:

http://www.regular-expressions.info/php.html

Link to comment
Share on other sites

You can also use validation at the form level with spry or similar - their textbox functions allow you to specify a minimum number of characters...

And I'd think the FM version would be @@* (Any character x2, plus the wildcard for a three character minimum) - but not tested

Link to comment
Share on other sites

This topic is 4703 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.