@chicane-ai/box-example
v1.0.0
Published
Example box for Chicane - {DESCRIPTION}
Maintainers
Readme
Chicane Box: {BOX_NAME}
| Developed by | {YOUR_NAME} | | --- | --- | | Date of development | {DATE} | | Validator type | {TYPE} | | Blog | {BLOG_URL} | | License | MIT | | Input/Output | {INPUT/OUTPUT} |
{DESCRIPTION}
🚀 Features
- ✅ Specific Validation: {DESCRIBE_VALIDATION}
- ✅ Flexible Configuration: {DESCRIBE_CONFIG}
- ✅ TypeScript: Fully typed
- ✅ Easy Integration: Compatible with SafetyCar
📦 Installation
npm install @chicane-ai/box-{BOX_NAME}🎯 Basic Usage
import { SafetyCar, OnFailAction } from '@chicane-ai/core';
import { {BOX_NAME} } from '@chicane-ai/box-{BOX_NAME}';
const validator = new SafetyCar().use(
new {BOX_NAME}(),
{ /* your configurations */ },
OnFailAction.EXCEPTION
);
const result = validator.validate('value to validate');
console.log("Valid:", result.valid);🔧 Configuration
{BOX_NAME}Config
interface {BOX_NAME}Config {
// Define here the specific configurations for your box
// Example:
// threshold?: number;
// maxLength?: number;
// pattern?: string;
}📝 Examples
Basic Example
const basicValidator = new SafetyCar().use(
new {BOX_NAME}(),
{ /* basic configurations */ },
OnFailAction.EXCEPTION
);Advanced Example
const advancedValidator = new SafetyCar().use(
new {BOX_NAME}(),
{ /* advanced configurations */ },
OnFailAction.REFRAIN
);🎯 Use Cases
- Use case 1: {DESCRIBE_USE_CASE_1}
- Use case 2: {DESCRIBE_USE_CASE_2}
- Use case 3: {DESCRIBE_USE_CASE_3}
🔍 Error Messages
The box provides clear error messages:
- Specific error 1: "Error description"
- Specific error 2: "Error description"
🤝 Contributing
To contribute to this box:
- Fork the repository
- Create a branch for your feature
- Implement your changes
- Add tests
- Open a Pull Request
