mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-02-10 18:20:53 +00:00
Stricter SteamID validation
This commit is contained in:
parent
c5eadf9aac
commit
f94c7fa15b
1 changed files with 2 additions and 1 deletions
|
@ -35,7 +35,8 @@ class Ban < ActiveRecord::Base
|
||||||
|
|
||||||
validate :validate_type
|
validate :validate_type
|
||||||
validate :validate_ventban
|
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_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
|
validates_length_of :reason, maximum: 255, allow_nil: true, allow_blank: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue