Class: FormKeeper::Constraint::AlphaSpace

Inherits:
Base
  • Object
show all
Defined in:
lib/formkeeper.rb

Instance Method Summary collapse

Instance Method Details

#validate(value, arg) ⇒ Object



217
218
219
220
221
# File 'lib/formkeeper.rb', line 217

def validate(value, arg)
  result = value =~ /^[[:alpha:][:space:]]+$/
  result = !result if !arg
  result
end