class DMap::Validations::Length
Only need the property tag when the validation attaches itself to the property
Attributes
property[RW]
Public Class Methods
is_valid?(command=nil)
click to toggle source
Return true if it’s valid
# File lib/dmap/validations/length.rb, line 10 def self.is_valid?(command=nil) command ||= "" !(command.match(/^\d+$/) or command.match(/^\d+\.\.\d+$/)).nil? end
property()
click to toggle source
# File lib/dmap/validations/length.rb, line 7 def self.property; true; end
validate(command=nil)
click to toggle source
# File lib/dmap/validations/length.rb, line 15 def self.validate(command=nil) command ||= "" DMap::Validations::Core::Numbers.run command end