Method: Kickflow::FormFieldDetail#list_invalid_properties

Defined in:
lib/kickflow/models/form_field_detail.rb

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'lib/kickflow/models/form_field_detail.rb', line 389

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @id.nil?
    invalid_properties.push('invalid value for "id", id cannot be nil.')
  end

  if @title.nil?
    invalid_properties.push('invalid value for "title", title cannot be nil.')
  end

  if @title.to_s.length > 255
    invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 255.')
  end

  if @field_type.nil?
    invalid_properties.push('invalid value for "field_type", field_type cannot be nil.')
  end

  if @required.nil?
    invalid_properties.push('invalid value for "required", required cannot be nil.')
  end

  if @approver.nil?
    invalid_properties.push('invalid value for "approver", approver cannot be nil.')
  end

  if @code.nil?
    invalid_properties.push('invalid value for "code", code cannot be nil.')
  end

  if @code.to_s.length > 255
    invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 255.')
  end

  if @size.nil?
    invalid_properties.push('invalid value for "size", size cannot be nil.')
  end

  if @min_length < 0
    invalid_properties.push('invalid value for "min_length", must be greater than or equal to 0.')
  end

  if @max_length < 0
    invalid_properties.push('invalid value for "max_length", must be greater than or equal to 0.')
  end

  if @decimal_digit < 0
    invalid_properties.push('invalid value for "decimal_digit", must be greater than or equal to 0.')
  end

  invalid_properties
end