Categories: None [Edit]

string_length_conformable

https://rubygems.org/gems/string_length_conformable
https://github.com/Yaponcik/string_length_conformable
This gem resolves basically two problems. --- 1. MySQL for strings(VARCHAR(255)) by default has limit 255 characters. And when developer left this attribute without any length validation, then it's possible to face with situation when user unintentionally or intentionally will pass in text field more characters. So, then, probably you will get 500... --- 2. PostgreSQL. The maximum number of characters for variable unlimited length types (text, varchar) is undefined. There is a limit of size in bytes for all string types: In any case, the longest possible character string that can be stored is about 1 GB. And when developer left this attribute without any length validation, then it's possible to face with situation when user unintentionally or intentionally will try to full up your database with lots of GB of 'important' info. --- Both of this cases, I guess, are not very pleasant. This gem adds default length validation for all string attributes. Except those which are already vlidated in standart rails way.

Total

Ranking: 109,124 of 188,635
Downloads: 6,787

Daily

Ranking: 140,898 of 188,368
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,094,829,933bundler
101,193,676,273rake
29937,507,240rspec

Owners

#GravatarHandle
1iconYaponcik