🚀 DAY 4 OF LAUNCH WEEK:Introducing Socket Scanning for OpenVSX Extensions.Learn more
Socket
Book a DemoInstallSign in
Socket

validates_russian

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validates_russian

bundlerRubygems
Version
0.1.0
Version published
Maintainers
1
Created
Source

validates_russian

[english_doc] [инструкции разработчикам] Gem Version Build Status Code Climate

Валидация русских значений:

Для генерации фейковых значений используйте gem 'faker-russian'

Установка

Добавь в Gemfile

gem 'validates_russian'

Использование

Используйте валидаторы в своей модели

validates :attribute, <validator_underscore>: true

где <validator_underscore> это название валидатора

class Legal < ActiveRecord::Base
  validates :kpp, kpp_format: true
end

# legal = Legal.new
# legal.kpp = '001122333'
# legal.valid? # => false
# legal.kpp = '525601001'
# legal.valid? # => true

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 28 Nov 2015

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