keystonejs/keystone-classic

TextType - Over-length value validates when both max and min specified

Open

#4,536 建立於 2017年12月28日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)JavaScript (14,656 star) (2,288 fork)batch import
4.x candidatebughelp wanted

描述

Expected behavior

When both max and min are specified in a field definition, over length strings should be refused.

Actual/Current behavior

Over length string accepted

Steps to reproduce the actual/current behavior

Define a field as per below: name: { type: Types.Text, required: true, min: 3, max: 5 }, Enter a string longer than 5 characters Submit

Environment

Keystone master (0ca9eb18c00fb051c579105ae7d283f98b182d8d) Node v9.2.0

Notes

Issue seems to be caused by a922b38a12bad632ef6f5d992ea91b363bb78d4f. If min length validation passes, all other validation results are discarded.

貢獻者指南