ConnectOut-sdp/sdp2023

View on GitHub
app/src/main/java/com/sdpteam/connectout/validation/ValidationUtils.java

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
package com.sdpteam.connectout.validation;

import android.widget.TextView;

public class ValidationUtils {
    public static boolean handleValidationFailure(boolean condition, TextView input, String error) {
        if (!condition) {
            input.setError(error);
            input.requestFocus();
        }
        return condition;
    }
}