Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom validation attachment points #15

Open
Shadowfiend opened this issue Apr 19, 2017 · 0 comments
Open

Custom validation attachment points #15

Shadowfiend opened this issue Apr 19, 2017 · 0 comments

Comments

@Shadowfiend
Copy link
Member

Shadowfiend commented Apr 19, 2017

Currently validation errors are always attached to the generated name of the associated field. It would be handy to allow for validations for a given field to be attached to a different identifier at a field level, and possibly also at a validation level. For example, say I have a hidden field, but I want to display its validation associated with a visible analogue to the field. In this case, I would need to do some client-side scripting to take the error attached to the hidden field and put it with the visible field. Instead, we could imagine:

  val myHiddenField = field[String](".selector").validatingAs("visible-field") ? ...
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

No branches or pull requests

1 participant