Sha256: 7aa0f73e13f2cba13c6ec2ed1920c1335f91c37af349352452fe01b467fbec5c

Contents?: true

Size: 312 Bytes

Versions: 3

Compression:

Stored size: 312 Bytes

Contents

module ActiveRecordSurvey
	# Ensure the instance_node has a length less than the maximum
	class NodeValidation::MaximumLength < NodeValidation
		# Validate the instance_node value
		def validate_instance_node(instance_node, node = nil)
			(self.value.to_i >= instance_node.value.to_s.length.to_i)
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_record_survey-0.1.7 lib/active_record_survey/node_validation/maximum_length.rb
active_record_survey-0.1.6 lib/active_record_survey/node_validation/maximum_length.rb
active_record_survey-0.1.5 lib/active_record_survey/node_validation/maximum_length.rb