Class: AWSCDK::AmplifyUIBuilder::CfnForm::FieldValidationConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
amplify_ui_builder/cfn_form.rb

Overview

The FieldValidationConfiguration property specifies the validation configuration for a field.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, num_values: nil, str_values: nil, validation_message: nil) ⇒ FieldValidationConfigurationProperty

Returns a new instance of FieldValidationConfigurationProperty.

Parameters:

  • type (String)

    The validation to perform on an object type.

  • num_values (Array<Numeric>, AWSCDK::IResolvable, nil) (defaults to: nil)

    The validation to perform on a number value.

  • str_values (Array<String>, nil) (defaults to: nil)

    The validation to perform on a string value.

  • validation_message (String, nil) (defaults to: nil)

    The validation message to display.



969
970
971
972
973
974
975
976
977
978
# File 'amplify_ui_builder/cfn_form.rb', line 969

def initialize(type:, num_values: nil, str_values: nil, validation_message: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @num_values = num_values
  Jsii::Type.check_type(@num_values, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siY29sbGVjdGlvbiI6eyJlbGVtZW50dHlwZSI6eyJwcmltaXRpdmUiOiJudW1iZXIifSwia2luZCI6ImFycmF5In19LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "numValues") unless @num_values.nil?
  @str_values = str_values
  Jsii::Type.check_type(@str_values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "strValues") unless @str_values.nil?
  @validation_message = validation_message
  Jsii::Type.check_type(@validation_message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "validationMessage") unless @validation_message.nil?
end

Instance Attribute Details

#num_valuesArray<Numeric>, ... (readonly)

The validation to perform on a number value.



991
992
993
# File 'amplify_ui_builder/cfn_form.rb', line 991

def num_values
  @num_values
end

#str_valuesArray<String>? (readonly)

The validation to perform on a string value.



996
997
998
# File 'amplify_ui_builder/cfn_form.rb', line 996

def str_values
  @str_values
end

#typeString (readonly)

The validation to perform on an object type.

``



986
987
988
# File 'amplify_ui_builder/cfn_form.rb', line 986

def type
  @type
end

#validation_messageString? (readonly)

The validation message to display.



1001
1002
1003
# File 'amplify_ui_builder/cfn_form.rb', line 1001

def validation_message
  @validation_message
end

Class Method Details

.jsii_propertiesObject



1003
1004
1005
1006
1007
1008
1009
1010
# File 'amplify_ui_builder/cfn_form.rb', line 1003

def self.jsii_properties
  {
    :type => "type",
    :num_values => "numValues",
    :str_values => "strValues",
    :validation_message => "validationMessage",
  }
end

Instance Method Details

#to_jsiiObject



1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
# File 'amplify_ui_builder/cfn_form.rb', line 1012

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "numValues" => @num_values,
    "strValues" => @str_values,
    "validationMessage" => @validation_message,
  })
  result.compact
end