{"record":{"id":"5263bab3daa47d8d","repo":"swc-project/swc","slug":"expected-valid-length-minimum-1-or-maximum-6-hex","errorCode":null,"errorMessage":"Expected valid length (minimum 1 or maximum 6 hex digits) in the start of unicode range","messagePattern":"Expected valid length \\(minimum 1 or maximum 6 hex digits\\) in the start of unicode range","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/values_and_units/mod.rs","lineNumber":2942,"sourceCode":"                    break;\n                }\n            }\n        }\n\n        let mut has_question_mark = false;\n\n        while let Some(c @ '?') = next {\n            has_question_mark = true;\n\n            start.push(c);\n\n            next = chars.next();\n        }\n\n        let len = start.len();\n\n        if len == 0 || len > 6 {\n            return Err(Error::new(\n                span,\n                ErrorKind::Expected(\n                    \"valid length (minimum 1 or maximum 6 hex digits) in the start of unicode \\\n                     range\",\n                ),\n            ));\n        }\n\n        // If any U+003F QUESTION MARK (?) code points were consumed, then:\n        if has_question_mark {\n            // 1. If there are any code points left in text, this is an invalid <urange>,\n            // and this algorithm must exit.\n            if next.is_some() {\n                return Err(Error::new(\n                    span,\n                    ErrorKind::Expected(\"no characters after '?' in unicode range\"),\n                ));\n            }","sourceCodeStart":2924,"sourceCodeEnd":2960,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/values_and_units/mod.rs#L2924-L2960","documentation":"Fired during <urange> validation: the start part of the range must be 1 to 6 hex digits (or '?' wildcards), but zero digits or more than six were consumed. This makes the code-point start value invalid per the spec algorithm.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/values_and_units/mod.rs:2942 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use between 1 and 6 hex digits for the range start, e.g. 'U+10FFFF'","Limit wildcards so the start part stays within 6 characters"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}