
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Ruby validator for format of Czech company identification number - ICO
Contains:
What is validated:
Ruby validator is one simple module with only one public method IcoValidation.valid_ico?
which returns true or false.
require 'ico_validator'
IcoValidation.valid_ico?('12345678') # invalid ico
=> false
IcoValidation.valid_ico?('27169278')
=> true
Rails validator is implemented as ActiveModel::EachValidator. So it's easy to use within your AR models:
class Company < ActiveRecord::Base
validates :ico, ico: true
end
If validation doesn't pass it adds :invalid_format
error on validated attribute.
ico-validator is Rails engine, so if you want to validate ico with javascript just add following to application.js
//= require ico-validator
And then on any field you want to be validated with JS:
<%= form_for(...) do |f| %>
<%= f.text_field :ico, class: 'ico-validate' %>
<% end %>
jQuery will bind validations there.
FAQs
Unknown package
We found that ico-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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.