require_relative "base"

module Validators
  module FieldValidator
    class Expires < Base

      EXPIRES_REGEXP = /^[0-9]+[smhdw]$/

      def valid?
        !@value.match(EXPIRES_REGEXP).nil?
      end

      def message
        "Invalid value, it should contains symbols '0-9smhdw'"
      end
    end
  end
end

