Code Duplication    Length = 11-11 lines in 2 locations

framework/core/Validator.php 2 locations

@@ 274-284 (lines=11) @@
271
     *
272
     * @return bool
273
     */
274
    public static function validateTextMaxLength($fieldName, $maxTextLength) {
275
        $text = trim(strip_tags(Request::getFieldValue($fieldName)));
276
        if (strlen($text) > $maxTextLength) {
277
            Errors::saveErrorFor(
278
                $fieldName,
279
                str_replace("[[1]]", $maxTextLength, \__ERRORS::MAX_TEXT_LENGTH)
280
            );
281
282
            return false;
283
        }
284
285
        return true;
286
    }
287
@@ 297-307 (lines=11) @@
294
     *
295
     * @return bool
296
     */
297
    public static function validateTextMinLength($fieldName, $minTextLength) {
298
        $text = trim(strip_tags(Request::getFieldValue($fieldName)));
299
        if (strlen($text) < $minTextLength) {
300
            Errors::saveErrorFor(
301
                $fieldName,
302
                str_replace("[[1]]", $minTextLength, \__ERRORS::MIN_TEXT_LENGTH)
303
            );
304
305
            return false;
306
        }
307
308
        return true;
309
    }
310