verygoodsecurity / vgs-collect-js

VGS Collect.js script loading module
https://www.verygoodsecurity.com/
7 stars 14 forks source link

Validation Error Display #87

Open emetcalf-leadventure opened 1 month ago

emetcalf-leadventure commented 1 month ago

Expected Behavior

I shouldn't see any validation errors when the field is not dirty. As I type input into the field the first time I shouldn't see a validation error.

Current Behavior

I see the validation error when I first type.

Possible Solution

Check if the field is dirty before firing the validation.

Steps to Reproduce (for bugs)

form.field('#space-for-my-field', { type: 'ssn', name: 'ssn', validations: ['required', 'validSSN'], });

Screenshot 2024-07-25 at 12 15 53 PM

Context

Just frustrating for users to get an error before completing the input.