Sha256: b225b19946d28d29fe00c11b7f1013d663a4529be06c7781a2dd111578476b68

Contents?: true

Size: 335 Bytes

Versions: 7

Compression:

Stored size: 335 Bytes

Contents

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
active_record_survey-0.1.7 lib/active_record_survey/node_validation/minimum_length.rb
active_record_survey-0.1.6 lib/active_record_survey/node_validation/minimum_length.rb
active_record_survey-0.1.5 lib/active_record_survey/node_validation/minimum_length.rb
active_record_survey-0.1.4 lib/active_record_survey/node_validation/minimum_length.rb
active_record_survey-0.1.3 lib/active_record_survey/node_validation/minimum_length.rb
active_record_survey-0.1.2 lib/active_record_survey/node_validation/minimum_length.rb
active_record_survey-0.1.1 lib/active_record_survey/node_validation/minimum_length.rb