keystonejs/keystone-classic

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

Open

#4,536 opened on 2017年12月28日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)JavaScript (2,288 forks)batch import
4.x candidatebughelp wanted

Repository metrics

Stars
 (14,656 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

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.

コントリビューターガイド