Class: CycloneLariat::Messages::V1::Validator
- Inherits:
-
LunaPark::Validators::Dry
- Object
- LunaPark::Validators::Dry
- CycloneLariat::Messages::V1::Validator
- Defined in:
- lib/cyclone_lariat/messages/v1/validator.rb
Constant Summary collapse
- UUID_MATCHER =
/^\h{8}-\h{4}-(\h{4})-\h{4}-\h{12}$/.freeze
- ISO8601_MATCHER =
/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|0[1-9]|[1-2][0-9])T(2[0-3]|[0-1][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|[+-](?:2[0-3]|[0-1][0-9]):[0-5][0-9])?$/.freeze
Instance Method Summary collapse
Instance Method Details
#check! ⇒ Object
25 26 27 |
# File 'lib/cyclone_lariat/messages/v1/validator.rb', line 25 def check! raise Errors::InvalidMessage.new(message: params, validation_errors: errors) unless success? end |