Closed gigjacker closed 7 years ago
Hi, I see no error in your solution. It should work. Maybe there is a bug in EA. Do you have a complete stack trace? I cannot help, nor fix, anything now since my notebook has crashed. I'm looking for a new one. It can take up to 2 weeks.
OK, I think I actually see the error - there is no closing bracket in My2ndEnumValueIn()
function invocation, at the end of your expression, this should work:
[RequiredIf(@"IsMyEnumValueCondition()
&& My2ndEnumValueIn(My2ndEnum.Opened, My2ndEnum.InProgress)")]
BTW: the exception details should denote which attribute has the broken expression, and point out the error position (line, column) within it.
Hi - thanks for getting to back to me. I'll put together a small reproducer.
...
And what happened was it works just fine, so I'm gonna have to go find out what silly, tiny error I have in the actual code. Sorry, guys.
Hi - this is just for anybody else having this problem. In the end it was that the nuget package hadn't been updated. I was on EA 2.6.8. After updating to 2.9.2, the problem went away.
Hi - I'm perfectly happy to boil this down to short reproducible example if need be but I think this will probably be quite easy for you to see what I'm doing wrong.
Model
Enums
I'm getting an InvalidToken exception thrown. Is this sort of thing just not allowed or am I missing something?
Cheers, .pd.