mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 01:11:23 +00:00
Stricter SteamID validation
This commit is contained in:
parent
b3d599a096
commit
03538de390
1 changed files with 2 additions and 1 deletions
|
@ -35,7 +35,8 @@ class Ban < ActiveRecord::Base
|
|||
|
||||
validate :validate_type
|
||||
validate :validate_ventban
|
||||
validates_format_of :steamid, with: /\A([0-9]{1,10}:){2}[0-9]{1,10}\Z/, allow_blank: true
|
||||
validates_length_of :steamid, maximum: 14, allow_blank: true
|
||||
validates_format_of :steamid, with: /\A0:[01]:[0-9]{1,10}\Z/, allow_blank: true
|
||||
validates_format_of :addr, with: /\A([0-9]{1,3}\.){3}[0-9]{1,3}:?[0-9]{0,5}\z/, allow_blank: true
|
||||
validates_length_of :reason, maximum: 255, allow_nil: true, allow_blank: true
|
||||
|
||||
|
|
Loading…
Reference in a new issue