From 9de57bcd990f5bde309507d2f4ef67eb8faabaf9 Mon Sep 17 00:00:00 2001 From: Naor Nagar Date: Tue, 31 Mar 2020 16:14:50 +0300 Subject: [PATCH] moving name validation to server side to support partial name search --- src/piplapis/data/fields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/piplapis/data/fields.php b/src/piplapis/data/fields.php index c86f032..7c92b04 100644 --- a/src/piplapis/data/fields.php +++ b/src/piplapis/data/fields.php @@ -329,7 +329,7 @@ public function is_searchable() $raw = PiplApi_Utils::piplapi_alpha_chars(!empty($this->raw) ? $this->raw : ''); $func = function_exists("mb_strlen") ? "mb_strlen" : "strlen"; - return ($func($first) >= 2 && $func($last) >= 2) || $func($raw) >= 4; + return $func($first) >= 1 || $func($last) >= 1 || $func($raw) >= 1; } }