docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "This criteria evaluates how effectively the engineer utilizes MJML's type system customization capabilities to build an attribute validator. The focus is on understanding and implementing MJML's validation patterns including unit types, enum types, and color validation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Unit pattern parsing",
"description": "Correctly implements parsing of unit patterns (e.g., 'unit(px,%)') to extract allowed units. Should handle the pattern syntax used in MJML's type system where units are comma-separated within parentheses.",
"max_score": 15
},
{
"name": "Multiple value unit validation",
"description": "Correctly implements validation for unit patterns with count specifications (e.g., 'unit(px,%){1,4}') that accept 1-4 space-separated values. Should validate both the unit types and the count of values as per MJML's attribute validation system.",
"max_score": 20
},
{
"name": "Single value unit validation",
"description": "Correctly validates single unit values against unit patterns (e.g., '10px' matches 'unit(px)' but '10em' does not). Should extract and verify the unit suffix matches one of the allowed units.",
"max_score": 15
},
{
"name": "Enum pattern parsing",
"description": "Correctly implements parsing of enum patterns (e.g., 'enum(left,center,right)') to extract the set of allowed values. Should handle MJML's enum syntax where values are comma-separated within parentheses.",
"max_score": 10
},
{
"name": "Enum value validation",
"description": "Correctly validates values against enum patterns with case-sensitive matching. Should reject values not in the allowed set, matching MJML's strict enum validation behavior.",
"max_score": 10
},
{
"name": "Hex color validation",
"description": "Correctly validates hex color formats including both short (#fff) and long (#ffffff) forms, matching MJML's color validation rules.",
"max_score": 10
},
{
"name": "RGB/RGBA color validation",
"description": "Correctly validates RGB and RGBA color formats (e.g., 'rgb(255,0,0)', 'rgba(255,0,0,0.5)'), following MJML's support for functional color notation.",
"max_score": 10
},
{
"name": "Named color validation",
"description": "Correctly validates named colors (e.g., 'red', 'blue', 'green') and rejects invalid color strings, consistent with MJML's color type validation.",
"max_score": 10
}
]
}