How do I validate a single type for multiple constraints? #247
-
I have this currently: (oib.refineNec[Numeric], oib.refineNec[FixedLength[11]]).parMapN(
(_, _) => oib.asInstanceOf[PlatformOib]
) Surely, there's a better way! |
Beta Was this translation helpful? Give feedback.
Answered by
Iltotore
Jun 27, 2024
Replies: 2 comments 3 replies
-
I'm also surprised I can't do |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello. Can you provide the definition of your Anyway I think you are looking for When you just want to cast a raw value to its constrained form without actually checking the constraint, you should use |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Iltotore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
Can you provide the definition of your
PlatformOib
?Anyway I think you are looking for
refineFurther
variants. There is an example in the docs IIRC.When you just want to cast a raw value to its constrained form without actually checking the constraint, you should use
assume
.