class UUIDValidator

Validates a OpenVAS UUID

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/openvas-cli/uuid_validator.rb, line 5
def validate_each(record, attribute, value)
  record.errors[attribute] << (options[:message] || "is not a valid UUID") unless
    value =~ /\A[0-9abcdef\-]{1,40}\z/i
end