Boolean string is valid
What this tool does
This tool checks if the text you enter is a simple yes or no answer. It is useful when you need to ensure that a field contains only 'true' or 'false' values, such as in forms or data lists. It helps prevent errors by validating that the input matches a basic pattern.
When to use it
- Validating user responses in a simple survey or form.
- Cleaning data to ensure yes/no fields are consistent.
- Checking configuration settings that require a clear yes or no.
- Pre-processing data before saving it to a database.
What to expect
You will get a clear yes/no indicator showing if the input matches the expected pattern. The result will tell you if the text is considered valid for a simple boolean check.
Limitations
- The check only works for the specific pattern 'true' or 'false' (case-sensitive).
- It does not understand other ways of saying yes or no, like 'yes', 'no', '1', or '0'.
- It does not check if the content makes logical sense, only if it looks like the required format.
When it fails
- The input is empty or missing.
- The input contains characters other than 'true' or 'false'.
- The input has extra spaces or different capitalization (e.g., 'True' vs 'true').
Good to know
- If you need to accept 'yes' or 'no', this tool is not the right choice.
- Use this tool only when the expected value is strictly the word 'true' or 'false'.
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
text | Yes | true | Enter the text to check. It is required. For example, type 'true' or 'false'. If the text is not a clear yes or no value, the check will fail. |
Output data
| Field | Description |
|---|---|
result | A yes/no indicator showing if the input text was recognized as a valid true or false value. For example, 'true' returns true, while 'asdasd' returns false. |