-
Notifications
You must be signed in to change notification settings - Fork 1
Code Reference
Manages form submission and is intended to contain the form elements.
Calls the submit()
function when pressed.
protocol
: Protocol
Handles the submission of the form.
Connects the submit_button
's pressed
signal to the submit
method if submit_button
is not null.
Submits the form data to the protocol.
-> Dictionary
Generates a dictionary of the form data.
subject
: Node
= self
The node to generate the dictionary from.
This is mainly used for recursion.
-> bool
Returns whether the given node is an input.
Inputs are:
- buttons except MenuButton
- LineEdit
- TextEdit
- ItemList
- Slider
- SpinBox
- GraphEdit
-
subject
:Node
LineEdit with a [validator].
Assigns the style from the [validator] if it exists.
TextEdit with a [validator].
Assigns the style from the [validator] if it exists.
Handles form submission and response.
-> int
Submits form data and returns HTTP status code of the response.
-
fields
:Dictionary
The output ofFormContainer.generate_fields_dict
-> Variant
Finds the value of the given Node based on its type.
Throws an error if the type is unknown.
BaseButton
-> button_pressed
: bool
LineEdit
| TextEdit
-> text
: String
Slider
| SpinBox
-> value
: float
GraphEdit
-> get_connection_list()
: Array[Dictionary]
ItemList
-> items
:
Array[{
selected = is_selected(): bool,
text = get_item_text(): String,
icon = get_item_icon(): Texture,
metadata = get_item_metadata(): Variant
}]
Validates Text Input according to rules about length and content.
A collection of predefined regular expression patterns.
Items correspond to the PredefinedRegex
Input must have a value.
[min_length
] will be adjusted if needed.
temporary storage of min_length used by the setter of required
Minimum length of the input.
Minimum and Maximum number of matches for \w+ allowed
List of allowed strings.
List of prohibited strings.
- NONE
- ALPHABETICAL
- NUMERICAL
- ALPHANUMERICAL
- EMAIL_ADDRESS
- PHONE_NUMBER
Predefined pattern to match against.
- MUST_MATCH_BOTH
Input must match both the predefined and the custom regex (if both are set) - CAN_MATCH_EITHER
Input can match either the predefined or the custom regex (if at least one is set)
How predefined and custom regexes are checked against in relation to each other.
Custom Pattern to match against.
Normalise the case before matching.
Don't allow any more than one match.
-> void
Compiles the custom regex
-> void
Validates given text and updates valid property.
-
new_text
:String
New content of the input
-> bool
Validates given text against all rules and returns validity
-
subject
:String
Text to validate
An upper and lower bound of an integer value.
Lower bound
Upper bound
-> bool
Determines if the subject is within the boundaries.
-
subject
:int
A filter with a blacklist or whitelist of strings
- ALL
All elements must be present - AT_LEAST_ONE
At least one element must be present
Match requirement
The blacklist or whitelist
-> bool
Returns wether the subject is represented in the list
-
subject
:String
-> int
Returns the output of elements.size()