Visit ComfyUI Online for ready-to-use ComfyUI environment
Validate input text based on specified criteria to streamline workflows and enhance data reliability.
The LmcqInputValidator
node is designed to provide a straightforward mechanism for validating input text based on specified criteria. Its primary function is to determine whether a given input string meets certain conditions, such as being a digit or a non-digit string. This node is particularly useful in scenarios where input validation is crucial, ensuring that the data being processed meets the expected format or type. By offering a simple yet effective validation method, the LmcqInputValidator
helps streamline workflows that require input verification, reducing errors and enhancing the reliability of subsequent processes.
The input_text
parameter is a string input that represents the text you want to validate. This parameter is crucial as it is the subject of the validation process. The default value for this parameter is an empty string, which means if no text is provided, the validation will automatically return false. The input_text
can be any string, and its content will determine the outcome of the validation based on the check_type
specified.
The check_type
parameter specifies the type of validation to be performed on the input_text
. It offers two options: is_digit
and is_string
. When set to is_digit
, the node checks if the input_text
consists solely of digits, returning true if it does. Conversely, when set to is_string
, the node verifies that the input_text
is not purely numeric, thus treating it as a string. This parameter is essential for guiding the validation logic and ensuring the input meets the desired criteria.
The result
output is a boolean value that indicates the outcome of the validation process. It returns true if the input_text
satisfies the condition specified by the check_type
parameter, and false otherwise. This output is critical for determining whether the input text is valid according to the specified criteria, allowing you to make informed decisions based on the validation result.
input_text
is not left empty unless you intend to receive a false validation result, as an empty string will not pass any validation checks.check_type
parameter to clearly define the validation criteria, choosing is_digit
for numeric checks and is_string
for non-numeric string validation.input_text
parameter is empty, leading to a false validation result.input_text
parameter to ensure the validation process can be executed properly.check_type
parameter is set to an unsupported value.check_type
is set to either is_digit
or is_string
to perform the intended validation.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.