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

X_validator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

X_validator

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

A few basic extra validations for Ruby on Rails.

I18N

The gem includes English and Chinese error messages. If you want to translate it to another language then copy [config/locales/en.yml][tr] to your project. Please send us your translations so we can add them!

Available validations

email

Validate if a string looks like an email address. This should work with unicode addresses ([RFC 6531][rfc6531], [IDN][idn]).

Accepts martin@lico.nl, but rejects martinlico.nl or martin@lico:

validates :email_column, email: true validates_email_of :email_column

phone

Check if this is a valid phone number. This should work with most, if not all.

validates :phone_number_column, phone: true validates_phone_of :phone_number_column

qq

Check if this is a valid qq number.

validates :qq_column, qq: true validates_qq_of :qq_column

url_name

Check if this is a valid url_name.

validates :url_name_column, url_name: true validates_url_name_of :url_name_column

FAQs

Package last updated on 05 Aug 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

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