
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
focuslight-validator
Advanced tools
Validate http request parameters (or others) by defined rule, without models.
SYNOPSIS:
require 'focuslight-validator'
result = Validator.validate(params, {
:request_param_key_name => { # single key, single value
:default => default_value,
:rule => [
Validator.rule(:not_null),
Validator.rule(:int_range, 0..10),
],
},
:array_value_key_name => { # single key, array value
:array => true
:size => 1..10 # default is unlimited (empty also allowed)
# default cannot be used
:rule => [ ... ]
}
# ...
[:param1, :param2, :param3] => { # rule for combination of 2 or more params
# default cannot be used
:rule => Validator::Rule.new(->(p1, p2, p3){ ... }, "error_message")
},
}
result.has_error? #=> true/false
result.errors #=> Hash( { param_name => "error message" } )
Add this line to your application's Gemfile:
gem 'focuslight-validator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install focuslight-validator
TBD: default/array/size/rule
TBD
TBD
TBD
TBD
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that focuslight-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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.