Open oliveiradev opened 7 years ago
Hi, This is an old issue but it might help others in the future.
In the rule, while checking for valid, you can check if the view is visible. If the view is invisible or gone, then return true.
Code sample for EmptyRule: @Override public boolean isValid(TextView view) { //if view is invisible or gone then always return valid boolean isHidden = !(view.getVisibility()== View.VISIBLE); return isHidden || !value || !TextUtils.isEmpty(view.getText()); }
or to apply to all rules, you can add to the isValid function of class Rule<ViewType extends View, ValueType> itself.
@manandhar-aarya Can you submit a pull request with your solution?
I just did. :)
This would be great.