package cloud.nstart.terravault.ordinis.validation;

import java.util.List;

public record ValidationResult(boolean valid, List<ValidationError> errors) {

  public static ValidationResult ok() {
    return new ValidationResult(true, List.of());
  }

  public static ValidationResult failed(List<ValidationError> errors) {
    return new ValidationResult(false, List.copyOf(errors));
  }
}
