{"record":{"id":"14eb318c18dbb2d7","repo":"swc-project/swc","slug":"expected-valid-length-minimum-1-or-maximum-6-hex-14eb31","errorCode":null,"errorMessage":"Expected valid length (minimum 1 or maximum 6 hex digits) in the end of unicode range","messagePattern":"Expected valid length \\(minimum 1 or maximum 6 hex digits\\) in the end of unicode range","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/values_and_units/mod.rs","lineNumber":3031,"sourceCode":"            match next {\n                Some(c) if c.is_ascii_digit() => {\n                    end.push(c);\n                    next = chars.next();\n                }\n                Some(c @ 'A'..='F') | Some(c @ 'a'..='f') => {\n                    end.push(c);\n                    next = chars.next();\n                }\n                _ => {\n                    break;\n                }\n            }\n        }\n\n        let len = end.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 end of unicode range\",\n                ),\n            ));\n        }\n\n        if chars.next().is_some() {\n            return Err(Error::new(\n                span,\n                ErrorKind::Expected(\"no characters after end in unicode range\"),\n            ));\n        }\n\n        return Ok(UnicodeRange {\n            span: span!(self, span.lo),\n            start: self.input.atom(start),\n            end: Some(self.input.atom(end)),","sourceCodeStart":3013,"sourceCodeEnd":3049,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/values_and_units/mod.rs#L3013-L3049","documentation":"Fired during <urange> end-value validation: after the '-' separator, the end part must consist of 1 to 6 hex digits, but zero or more than six were found, making the range end invalid per the spec algorithm.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/values_and_units/mod.rs:3031 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use 1 to 6 hex digits for the range end, e.g. 'U+0-10FFFF'","Ensure the end value is not empty after the '-'"],"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"}