Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gds-data-validation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gds-data-validation

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

gds-data-validation

A data validation library providing a rule-based schema definition language.
For checking (incoming) data against a specified schema definition.
GDS stands for General Data Structure.

Installation

gem install gds-data-validation

An Example

require "gds-data-validation"

dataValidation = GdsDataValidation.create( <<-EOS )
company = :name        : @t_string,
          :address     : address,
          :ceo         : person,
          :employees   : person*
person =  :firstname   : @t_string,
          :lastname    : @t_string,
          :yearOfBirth : @t_int,
          :address     : address
address = :street      : @t_string,
          :zipcode     : @t_int,
          :city        : @t_string
EOS

dataValidation.check( nil )   # => false
dataValidation.check(
  { name: 'My Company', address: { street: 'Broadway 300', zipcode: 22222, city: 'New York' },
    ceo: { firstname: 'John', lastname: 'McArthur', yearOfBirth: 1959,
           address: { street: 'Rosedale Dr. 40', zipcode: 34003, city: 'Los Angeles' } },
    employees: [
      { firstname: 'Berry', lastname: 'Miller', yearOfBirth: 1989,
        address: { street: 'South St. 12', zipcode: 48333, city: 'Chicago' } },
      { firstname: 'Jane', lastname: 'Smith', yearOfBirth: 1993,
        address: { street: 'Mainstreet 4', zipcode: 62883, city: 'Seattle' } } ] }
)   # => true

Introduction

The original idea was to create a library for the validation of data structures which have been created by the GDS (General Data Structure) language.

Synonyms and related terms are data validation, validation checker, schema validation, schema validator, schema checker.

Ruby Gem

You can find it on RubyGems.org:

rubygems.org/gems/gds-data-validation

Source Code

You can find the source code on GitHub:

github.com/uliramminger/gds-data-validation

Further Information

You will find detailed information here: urasepandia.de/gds-data-validation.html

Maintainer

Uli Ramminger uli@urasepandia.de

Copyright (c) 2019 Ulrich Ramminger

See MIT-LICENSE for further details.

FAQs

Package last updated on 11 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc