Skip to content

Generic validator originally created for use within eProcurement.

Notifications You must be signed in to change notification settings

alexndr79/vefa-validator

 
 

Repository files navigation

Maven Central Docker

VEFA Validator 2.0

Features

  • Very easy to use.
  • Much faster than the old validator.
  • Supports rendering documents.
  • Very low footprint in your code.
  • Pooling of resources.
  • Supports different lifecycles of validation artifacts.
  • Configurable to fit multiple sizes.
  • Nested validation (next version)
  • Tailoring individual validation using properties (next version)

Getting started

Include dependency in your pom.xml:

<dependency>
  <groupId>no.difi.vefa</groupId>
  <artifactId>validator-core</artifactId>
  <version>2.0.2</version>
</dependency>

Start validating business documents:

// Create a new validator using validation artifacts from Difi.
Validator validator = ValidatorBuilder.newValidator().build();

// Validate business document.
Validation validation = validator.validate(Paths.get("/path/to/document.xml"));

// Print result of validation.
System.out.println(validation.getReport().getFlag());

The validator is expensive to create, one instance should be enough.

About

Generic validator originally created for use within eProcurement.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.9%
  • XSLT 1.8%
  • Other 1.3%