From 3ce11b937bd1c16113317a1e9c230c9813d62b4e Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 13 Nov 2021 08:30:24 +0000 Subject: Make title required --- src/DTS/Validator.php | 4 ---- src/templates/index.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/DTS/Validator.php b/src/DTS/Validator.php index a688832..b4c85f7 100644 --- a/src/DTS/Validator.php +++ b/src/DTS/Validator.php @@ -47,10 +47,6 @@ class Validator { $title = trim($title); - if ($title === '') { - return; - } - if (strlen($title) < $minLength || strlen($title) > $maxLength) { $this->errors->add('title', "Must be between $minLength and $maxLength in characters in length"); } diff --git a/src/templates/index.php b/src/templates/index.php index 35dd7ad..d8f751f 100644 --- a/src/templates/index.php +++ b/src/templates/index.php @@ -26,7 +26,7 @@
  • - addedAt))->format('Y-m-d'); ?> - title != '' ? htmlentities($bookmark->title) : htmlentities($bookmark->url); ?> | tag) { ?>tag); ?> | Edit | Delete + addedAt))->format('Y-m-d'); ?> - title); ?> | tag) { ?>tag); ?> | Edit | Delete
  • -- cgit v1.2.3-13-gbd6f