jwaliszko / ExpressiveAnnotations

Annotation-based conditional validation library.
MIT License
351 stars 123 forks source link

Problem with internal functions that call other functions in v2.7.2 #168

Closed abw1023 closed 7 years ago

abw1023 commented 7 years ago

Internal functions, like ContainsIgnoreCase, that call other internal functions, like Contains, are not working. When ContainsIgnoreCase is called the 'this' object has no definition for Contains, so the line return this.Contains(str, substr); returns null.

This appears to be because the data-val-assertthat-methodslist has a value of '["ContainsIgnoreCase","Length"]', so the Contains function is not created in the object.

jwaliszko commented 7 years ago

Hi, thanks for raising this defect.

mapo80 commented 7 years ago

This is a great bug! I've downgraded to 2.9.2 to resolve this issue? Someone knows how to solve?

Thanks

jwaliszko commented 7 years ago

@abw1023, @mapo80: Fixed here: https://github.com/jwaliszko/ExpressiveAnnotations/commit/41d5f6e89926fcadaeaa5317e74eb2bb79235861. Released with 2.9.5.