Method: LinodeOpenapiClient::User#list_invalid_properties
- Defined in:
- lib/linode_openapi_client/models/user.rb
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/linode_openapi_client/models/user.rb', line 136 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@username.nil? && @username.to_s.length > 32 invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 32.') end if !@username.nil? && @username.to_s.length < 3 invalid_properties.push('invalid value for "username", the character length must be great than or equal to 3.') end pattern = Regexp.new(/^[a-zA-Z0-9]((?![_-]{2,})[a-zA-Z0-9-_])+[a-zA-Z0-9]$/) if !@username.nil? && @username !~ pattern invalid_properties.push("invalid value for \"username\", must conform to the pattern #{pattern}.") end invalid_properties end |