diaspora/diaspora_federation

View on GitHub
lib/diaspora_federation/validators/poll_answer_validator.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module DiasporaFederation
  module Validators
    # This validates a {Entities::PollAnswer}.
    class PollAnswerValidator < OptionalAwareValidator
      include Validation

      rule :guid, :guid
      rule :answer, [:not_empty, length: {maximum: 255}]
    end
  end
end