Skip to content

Instantly share code, notes, and snippets.

@Hasstrup
Created November 5, 2024 19:25
Show Gist options
  • Save Hasstrup/24aa778f6ebfdc2b409cba57e359d051 to your computer and use it in GitHub Desktop.
Save Hasstrup/24aa778f6ebfdc2b409cba57e359d051 to your computer and use it in GitHub Desktop.
class Users::RegistrationInput < BaseInput
REQUIRED_KEYS = %i[email password].freeze
attributes(*REQUIRED_KEYS, :first_name, :last_name)
def validate!
validate_required_keys!
end
end
############
class Users::AuthenticationInput < BaseInput
REQUIRED_KEYS = %i[email password].freeze
attributes(*REQUIRED_KEYS)
def validate!
validate_required_keys!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment