Method: OpenapiClient::Body#list_invalid_properties
- Defined in:
- lib/openapi_client/models/body.rb
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
56 57 58 59 60 61 62 63 64 |
# File 'lib/openapi_client/models/body.rb', line 56 def list_invalid_properties invalid_properties = Array.new pattern = Regexp.new(/(^(0[xX]){1}[A-Fa-f0-9]+$)|(^#[A-Fa-f0-9]{6}$)/) if !@color.nil? && @color !~ pattern invalid_properties.push("invalid value for \"color\", must conform to the pattern #{pattern}.") end invalid_properties end |