Add validity class target selector configuration by farneman · Pull Request #59 · hyperform/hyperform · GitHub
Skip to content

Add validity class target selector configuration - #59

Open
farneman wants to merge 1 commit into
hyperform:masterfrom
farneman:add-validity-class-selector
Open

farneman wants to merge 1 commit into
hyperform:masterfrom
farneman:add-validity-class-selector

Conversation

@farneman

Copy link
Copy Markdown
Contributor

This adds a classSelector config option in the form of a function that receives the currently validated element as an argument. If this config option is supplied, it is called and the result is used as the target for adding validity classes. If not the element is used as it presently does. Having this option allows for other common CSS styling patterns that are not possible with only having classes on the actual validated element.

I wasn't sure the best place to put the test for this feature, so let me know if I need to move it.

@farneman

Copy link
Copy Markdown
Contributor Author

@farneman
farneman force-pushed the add-validity-class-selector branch from 57eb2aa to 2365ba8 Compare May 20, 2017 13:59
@farneman

Copy link
Copy Markdown
Contributor Author

I've updated this branch to sync with the current master.

@farneman

farneman commented Jun 8, 2017

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant