You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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'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)
The text was updated successfully, but these errors were encountered: