
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

DataValidator is validation everywhere.
For Example, Controller or else.
params = {foo: 'foo', bar: 'bar'}
validator = DataValidator::Validator.new(
params,
{foo: {length: {is: 4}}},
{bar: {presence: true, format: {with: /\A[a-zA-Z]+\z/}}}
)
unless validator.valid?
@errors = validator.errors
end
@errors
=> {
foo: ["is the wrong length (should be 4 characters)"],
bar: ["can't be blank", "is invalid"]
}
DataValidator has almost AR validation logics by default.
DataValidator supports i18n.
If you use rails, you not worry about locale file.
Ex)
# encoding: UTF-8
module DataValidator
class TestValidator < BaseValidator
def validate
if options && values !~ /[^@]+$/
error_add :invalid_test, test: value
end
end
end
end
BaseValidator set accessors below.
Please see test case.
An error message subject uses "datavalidator.attribute.#{name}" in i18n locale file or name.
Add this line to your application's Gemfile:
gem 'data_validator'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install data_validator
require 'data_validator'
git checkout -b my-new-feature)git commit -am 'Added some feature')git push origin my-new-feature)Copyright (c) 2012- HARUAYMA Makoto (SpringMT)
MIT (see MIT-LICENSE)
FAQs
Unknown package
We found that data_validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.