validate icon indicating copy to clipboard operation
validate copied to clipboard

Change to default errors IDs so that square brackets are subbed for hyphens

Open dansiberry opened this issue 7 years ago • 0 comments

A small suggestion about subbing square brackets for hyphens when the error IDs are copied directly from the field name .

In my use case in Rails, fields with names such as 'user[profile_attributes][username]' were producing default IDs that weren't searchable with querySelector. A value of null is returned instead of the DOM node. Eg - document.querySelecter('.form-error-message#error-for-user[email]') -> null

This means the errors stack up as the function to remove them isn't finding the element.

I was unable to run the Gulp build unfortunately. Please advise on version number changes

dansiberry avatar Mar 26 '18 12:03 dansiberry