Skip to main content

dpp_rules/textiles/
care.rs

1//! Care symbol validation — ISO 3758:2012 care labelling.
2//!
3//! ## Current schema state
4//! The textile schema v1.1.0 carries `careInstructions` as a **free-text string**
5//! (`"ISO 3758 care symbols or free text care instructions"`). There is no
6//! structured array of individual symbols. Cross-field validation of individual
7//! care symbol codes is therefore not applicable until the schema is updated to
8//! carry a structured representation (e.g. an array of symbol objects).
9//!
10//! ## ISO 3758:2012 symbol categories (for reference)
11//! | Category        | Examples                              |
12//! |-----------------|---------------------------------------|
13//! | Washing         | 30 °C, 40 °C, 60 °C, 95 °C, hand wash |
14//! | Bleaching       | any bleach, non-chlorine only, do not bleach |
15//! | Tumble drying   | normal, low heat, do not tumble dry   |
16//! | Natural drying  | line dry, drip dry, dry flat, in shade|
17//! | Ironing         | low (110 °C), medium (150 °C), high (200 °C), do not iron |
18//! | Professional    | dry clean (F, P, W), wet clean        |
19//!
20//! ## Placeholder note
21//! When the textile schema introduces a structured `careSymbols` array field,
22//! implement:
23//! - `washing_temperature_valid(temp_c: u32) -> bool` — allowed values: 30, 40, 60, 70, 95
24//! - `care_treatment_valid(treatment: &str) -> bool` — checks against the ISO 3758 symbol set
25//! - Cross-field: if `washingTempC` is declared, a washing symbol must also be present
26
27// Placeholder — rules to be implemented once the textile schema carries
28// a structured care-symbol array rather than a free-text string.