// Path: valifi/src/main/java/com/mlykotom/valifi/exceptions/ValiFiException.java
// public class ValiFiException extends RuntimeException {
// 	public ValiFiException() {
// 	}
// 
// 	public ValiFiException(String message) {
// 		super(message);
// 	}
// }
// 
// Path: valifi/src/main/java/com/mlykotom/valifi/exceptions/ValiFiValidatorException.java
// public class ValiFiValidatorException extends ValiFiException {
// 	public ValiFiValidatorException() {}
// 
// 	public ValiFiValidatorException(String message) {
// 		super(message);
// 	}
// }


import android.widget.EditText;
import com.google.android.material.textfield.TextInputLayout;
import com.mlykotom.valifi.exceptions.ValiFiException;
import com.mlykotom.valifi.exceptions.ValiFiValidatorException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.databinding.BindingAdapter;
import androidx.databinding.Observable;
	 * If you want to manually show error for the field
	 */
	@Override
	public void validate() {
		notifyValueChanged(true);
		refreshError();
	}

	/**
	 * Allows empty field to be valid.
	 * Useful when some field is not necessary but needs to be in proper format if filled.
	 *
	 * @param isEmptyAllowed if true, field may be empty or null to be valid
	 * @return this, co validators can be chained
	 */
	public ValiFieldBase<ValueType> setEmptyAllowed(boolean isEmptyAllowed) {
		mIsEmptyAllowed = isEmptyAllowed;
		return this;
	}

	/**
	 * Sets how much it will take before error is shown.
	 * Does not apply in cases when validation changes (e.g invalid to valid or vice versa)
	 *
	 * @param delayMillis positive number - time in milliseconds
	 * @return this, validators can be chained
	 * @see #setErrorDelay(ValiFiErrorDelay) for immediate or manual mode
	 */
	public ValiFieldBase<ValueType> setErrorDelay(long delayMillis) {
		if (delayMillis <= 0) {
// Path: valifi/src/main/java/com/mlykotom/valifi/exceptions/ValiFiException.java
// public class ValiFiException extends RuntimeException {
// 	public ValiFiException() {
// 	}
// 
// 	public ValiFiException(String message) {
// 		super(message);
// 	}
// }
// 
// Path: valifi/src/main/java/com/mlykotom/valifi/exceptions/ValiFiValidatorException.java
// public class ValiFiValidatorException extends ValiFiException {
// 	public ValiFiValidatorException() {}
// 
// 	public ValiFiValidatorException(String message) {
// 		super(message);
// 	}
// }


// Path: valifi/src/main/java/com/mlykotom/valifi/ValiFieldBase.java
import android.widget.EditText;
import com.google.android.material.textfield.TextInputLayout;
import com.mlykotom.valifi.exceptions.ValiFiException;
import com.mlykotom.valifi.exceptions.ValiFiValidatorException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.databinding.BindingAdapter;
import androidx.databinding.Observable;

	 * If you want to manually show error for the field
	 */
	@Override
	public void validate() {
		notifyValueChanged(true);
		refreshError();
	}

	/**
	 * Allows empty field to be valid.
	 * Useful when some field is not necessary but needs to be in proper format if filled.
	 *
	 * @param isEmptyAllowed if true, field may be empty or null to be valid
	 * @return this, co validators can be chained
	 */
	public ValiFieldBase<ValueType> setEmptyAllowed(boolean isEmptyAllowed) {
		mIsEmptyAllowed = isEmptyAllowed;
		return this;
	}

	/**
	 * Sets how much it will take before error is shown.
	 * Does not apply in cases when validation changes (e.g invalid to valid or vice versa)
	 *
	 * @param delayMillis positive number - time in milliseconds
	 * @return this, validators can be chained
	 * @see #setErrorDelay(ValiFiErrorDelay) for immediate or manual mode
	 */
	public ValiFieldBase<ValueType> setErrorDelay(long delayMillis) {
		if (delayMillis <= 0) {
			throw new ValiFiValidatorException("Error delay must be positive");