-
Notifications
You must be signed in to change notification settings - Fork 6
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
Validation: referring to other fields #1
Comments
To expand on this a bit, you can currently assign fields to a variable and refer to them: val username = field[String](".username")
val password = field[String]("type=password") ? { newPassword =>
if (username.value == Full("shadowfiend") && newPassword != "password") {
Full("Shadowfiend can only have an insecure password.")
} else {
Empty
}
} However, the key here is that So maybe we do need a way to declare interdependencies or something of the sort. |
Btw, field groups offer a way of dealing with this issue now. You can use We're using these at Elemica now, though there are still some annoyances around reporting the errors back to the client in these cases, which I've captured in #17. |
ML thread here: https://groups.google.com/forum/#!topic/liftweb/KeIJt01L20A
The text was updated successfully, but these errors were encountered: