Open AliTaylor1 opened 6 years ago
have you solved it?
@AliTaylor1 @traitaodoc1994 @ragunathjawahar can you tell me how to solve it? I had the same problem.
Hey,
I found the solution around this. Compare your validator initialization with the bottom code snippet.
Validator validator = new Validator(this);
Always pass this as its controller reference. If you're trying to pass getContext()/requireContext() or getActivity()/requireActivity() then somehow It won't be able to figure out on which class you are try to associate your validator.
I hope it helps. Happy Coding! </>
I'm really struggling to recreate this validation issue where some somehow the ValidatorContext losses context. Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.mobsandgeeks.saripaar.ValidationContext.setViewRulesMap(java.util.Map)' on a null object reference at com.mobsandgeeks.saripaar.Validator.createRulesSafelyAndLazily(Validator.java:479)