- Validation Functions
- Virtual Columns
- Data Transforms
- Regex Column Type
How it works
1
Open a supported editor
Open a supported editor in CSVbox.
2
Click Generate
Click the Generate button.
3
Describe the logic you want
Describe the logic in plain language. CSVbox generates compatible JavaScript or regex code.
4
Review the generated output
Review the output. All generated code remains fully editable before saving.
5
Insert and save the function
Insert the code and save the function.
Supported features
Writing better prompts
The quality of the generated output depends heavily on how clearly you describe the requirement. For best results:- Mention exact column names when possible.
- Clearly describe the expected output.
- Include formatting requirements.
- Add examples for complex logic.
- Focus on one task at a time.
- Avoid vague instructions.
AI generator for validation functions
Generate validation rules from plain-language descriptions instead of writing JavaScript validation logic by hand. Useful for:- Email validation
- Phone number validation
- Date validation
- Required field checks
- Cross-column validation
- Business-specific validation rules
Example prompts
Email validation
Prompt"user@example.com"→ valid"user@"→ invalid
Phone number validation
Prompt"(555) 123-4567"→ valid"123-456"→ invalid
Date validation
Prompt"2023-12-25"→ valid"12/25/2023"→ invalid
Cross-column validation
Promptstart_date="2023-01-01", end_date="2023-12-31"→ validstart_date="2023-12-31", end_date="2023-01-01"→ invalid
Validation prompt tips
For better validation results:- Start with action words such as:
- validate
- ensure
- verify
- require
- check
- Mention exact field names.
- Describe the validation condition clearly.
- Include valid and invalid examples for complex rules.
- Mention how blank or null values should behave.
AI generator for virtual columns
Generate computed or derived columns from natural-language instructions. Instead of writing JavaScript logic by hand, describe what the virtual column should calculate or return. Useful for:- Combining fields
- Calculated totals
- Derived statuses
- Formatting dates
- Extracting values
- Building custom labels
Example prompts
Full name column
Prompt"john"+"DOE"→"John Doe"
Total price calculation
Promptquantity=5, unit_price=10.50→52.50
Date formatting
Prompt"12/25/2023"→"December 25, 2023"
Status generation
Prompt- Past date →
"Overdue" - Within 7 days →
"Due Soon" - Future date →
"On Track"
Virtual column prompt tips
- Mention which fields should be used.
- Describe the expected output clearly.
- Specify formatting rules.
- Include examples for calculated logic.
- Focus on one generated field at a time.
AI generator for data transforms
Generate data transformation logic from plain-language instructions to clean, normalize, or reformat imported data automatically. Useful for:- Text normalization
- Formatting cleanup
- Phone number cleanup
- Date conversion
- Value mapping
- Row transformations
Example prompts
Email standardization
Prompt" John.Doe@Example.COM "→"john.doe@example.com"
Phone number cleanup
Prompt"(555) 123-4567"→"5551234567"
Full name generation
Prompt"john"+"DOE"→"John Doe"
Date formatting
Prompt"12/25/2023"→"2023-12-25"
Data transform prompt tips
- Start with action words like:
- convert
- remove
- replace
- format
- normalize
- combine
- Specify the target column.
- Clearly describe the final output format.
- Include sample input/output values for complex transforms.
- Keep transformations focused and specific.
AI generator for regex patterns
Generate regular expression (regex) patterns from plain-language descriptions. Instead of writing regex syntax by hand, describe the format you want to validate and CSVbox generates the pattern automatically. Useful for:- Email validation
- Phone number formats
- ZIP/postal codes
- Product code validation
- Password rules
- Custom formatting patterns
Example prompts
Phone number validation
PromptEmail validation
PromptZIP code validation
PromptProduct code format
PromptBest practices
Keep prompts focused
Short, focused prompts produce better results than large multi-step instructions. Good:Use exact column names
Prefer:Mention formatting rules
Examples:YYYY-MM-DD10 digit phone numberuppercase product codecurrency with 2 decimals
Include examples for complex logic
Adding examples improves accuracy significantly. For example:Testing generated code
Always review and test generated code before saving. Recommended testing steps:- Review the generated output.
- Test with sample values.
- Test blank and null values.
- Verify edge cases.
- Confirm expected formatting.
- Ensure only intended fields are modified.
Limitations
Current limitations
- Generates JavaScript functions and regex patterns only.
- External APIs and network requests are not supported.
- Browser APIs like localStorage and cookies can’t be used.
- Complex multi-step workflows may require multiple functions.
Unsupported operations
The AI can’t:- Add or remove rows
- Modify your importer schema
- Access external systems
- Call third-party APIs
- Access databases
- Read files outside CSVbox
- Perform actions outside the CSVbox execution environment
Common issues
Generation failed
Possible causes
- Network issue
- Temporary server-side issue
- Prompt too complex
- Prompt too ambiguous
Solutions
- Retry after a few seconds.
- Simplify the prompt.
- Make instructions more specific.
- Break large logic into smaller prompts.
Generated output is incorrect
Possible causes
- Missing formatting details
- Ambiguous instructions
- Missing edge cases
- Unclear expected output
Solutions
- Add input/output examples.
- Mention formatting rules explicitly.
- Specify null or blank value handling.
- Focus on one task at a time.
Tips for better results
- Use exact field names whenever possible.
- Keep prompts concise and specific.
- Mention edge cases such as blank values.
- Include examples for complex rules.
- Generate one function at a time.
- Review generated code before saving.
- Test thoroughly before production use.
Security and safety
Generated code runs within the CSVbox execution environment and follows CSVbox security restrictions. Generated functions can’t:- Access external systems
- Make network requests
- Access browser storage
- Modify importer configuration automatically

