Skip to content

Alinex Validator

validator icon

It is the most powerful and complete data validation library based on a schema definition which can validate complex data structures in depth and also sanitize and transform them. To complete it you can also load such data from different sources like files or web services in nearly every data format. Using the included CLI process you may also check, preprocess and transform data structures before they are used in any program.

Basically the alinex-validator is an extension to the alinex-datastore with addition of checking and optimizing the value structures. As such it nearly has the same API with some additional methods.

Big Features:

  • read, write and transform data structures
  • different protocols, compression and formats are supported
  • with simple and complex data types in schema
  • supporting references in checks
  • import and export of schema definitions
  • multilingual and detailed descriptions or errors

This allows to:

  • read configuration data and check that they are valid
  • give the user a data structure help text
  • call REST services and check for valid result
  • check any external data to prevent data injection

In contrast to JSON Schema and hapi joi a lot more possibilities are build into it.

Modules

For such a big set of possibilities a lot of modules are needed. But keep cool, this library will install them all but only load the ones really used.

Chapters

Read all about the alinex-validator in the chapters (top navigation menu):

  • Usage - How to Guide
  • Schema - Detailed API for defining validation schemas
  • Architecture - Internal development basics if you want to extend this library

Support

I don't give any paid support but you may create GitLab Issues:

  • Bug Reports or Feature: Please make sure to give as much information as possible. And explain how the system should behave in your opinion.
  • Code Fixing or Extending: If you help to develop this package I am thankful. Develop in a fork and make a merge request after done. I will have a look at it.
  • Should anybody be willing to join the core team feel free to ask, too.
  • Translations: If you are willing to translate into other languages we will find the easiest way for you to do the translation and include it. Also see i18n documentation.
  • Any other comment or discussion as far as it is on this package is also kindly accepted.

Please use for all of them the GitLab Issues which only requires you to register with a free account.

Statistics

The following statistics will give you a better understanding about it's complexity. The documentation has 90 pages (in A4 PDF format) and contains 144026 characters. And this package has 8491 lines of code.

The latest version in the repository is Version 3.9.0. It has a size of 680,59KiB in 143 files. The development contains 34 packages (resolved) and 4 of it are from the Alinex project.

Download Documentation

If you want to have an offline access to the documentation, feel free to download the 90 pages PDF Documentation.

License

Alinex Bash Library

Copyright 2018 - 2021 Alexander Schilling (https://gitlab.com/alinex/node-validator)

Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.