Last active
May 18, 2017 12:37
-
-
Save dgouyette/b2be561892725dd74c747f6ce175849a to your computer and use it in GitHub Desktop.
PathOrRepath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pivot.Rules | |
import jto.validation._ | |
Rules.maxLength(2).validate("messageWithoutPath")//Invalid(List((/,List(ValidationError(List(error.maxLength),WrappedArray(2)))))) | |
val nomEmptyWithPAth = Rules.notEmpty.repath(_ => Path \"newPath") | |
nomEmptyWithPAth.validate("")// Invalid(List((/newPath,List(ValidationError(List(error.required),WrappedArray()))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Un coup de scala meta pour faire le repath