Sha256: 1bbe153413fbd06cd7f189b11ae51bb6fb88f627825b7dd66fdb51fba94d8a74

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

ValidationError = require "hoarder/validator/error/validation_error"

#
# @author - Tim Shelburne <tim@musiconelive.com>
#
# 
#
class AlphaConstraint
  canHandle: (type)->
    type is "alpha"

  handle: (element)->
#    if element.value.match(/^[A-Za-z0-9\s]*$/)
#      return []
#    else
#      return [ new ValidationError "This field only accepts numbers and characters (0-9, A-Z, a-z)." ]

return AlphaConstraint

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hoarder-js-0.0.1 assets/scripts/coffee/hoarder/validator/constraints/alpha_constraint.coffee