Module: Pre::Validators::Format

Included in:
Pre::Validator
Defined in:
lib/pre/validators/format.rb

Instance Method Summary collapse

Instance Method Details

#valid_format?Boolean

Returns:

  • (Boolean)


4
5
6
7
# File 'lib/pre/validators/format.rb', line 4

def valid_format?
  return false unless parsed.respond_to? :domain
  parsed.domain.dot_atom_text.elements.size > 1
end