All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.hibernate.validator.runtime.ValidatorProvider Maven / Gradle / Ivy

Go to download

Validate object properties (field, getter) and method parameters for your beans (REST, CDI, Jakarta Persistence)

There is a newer version: 3.15.0
Show newest version
package io.quarkus.hibernate.validator.runtime;

import jakarta.enterprise.inject.Produces;
import jakarta.inject.Named;
import jakarta.inject.Singleton;
import jakarta.validation.Validator;

import org.hibernate.validator.HibernateValidatorFactory;

@Singleton
public class ValidatorProvider {

    @Produces
    @Named("quarkus-hibernate-validator-factory")
    @Singleton
    public HibernateValidatorFactory factory() {
        return ValidatorHolder.getValidatorFactory();
    }

    @Produces
    @Singleton
    public Validator validator() {
        return ValidatorHolder.getValidator();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy