Expand description
Format validation helpers for AHB 900-series conditions.
These validate the FORMAT of data element values (decimal places, numeric ranges,
time patterns, ID formats, etc.). They operate on string values extracted from
EDIFACT segments and return ConditionResult.
Re-exports§
pub use super::timezone::dst_transitions_between;pub use super::timezone::is_mesz_utc;pub use super::timezone::is_mez_utc;pub use super::timezone::parse_dtm303;pub use super::werktag::compute_easter;pub use super::werktag::is_german_holiday;pub use super::werktag::is_werktag;pub use super::werktag::parse_ccyymmdd_prefix;pub use super::werktag::werktage_between;
Functions§
- is_
obis_ wirkarbeit_ kumuliert - Is the OBIS code “Wirkarbeit kumuliert” — active energy as a cumulated time integral (total or per billing period)?
- is_
obis_ wirkarbeit_ quarter_ hour - Is the OBIS code “Wirkarbeit 1/4 Stunde” — active energy 15-minute interval (Lastgang) measurement?
- parse_
obis - Parse an OBIS code of the form
A-B:C.D.E[*F]and return(C, D). - utc_
now_ ccyymmddhhmm - Current UTC date+time as a CCYYMMDDHHMM string (12 chars).
- validate_
all_ digits - Validate that a string contains only digits (positive integer check).
- validate_
artikel_ pattern - Validate a dash-separated digit pattern like “n1-n2-n1-n3”.
- validate_
email - Validate email format: must contain both ‘@’ and ‘.’.
- validate_
exact_ length - Validate exact character length.
- validate_
hhmm_ equals - Validate that a DTM value’s HHMM portion equals the expected value.
- validate_
hhmm_ range - Validate that a DTM value’s HHMM portion is within a range (inclusive).
- validate_
malo_ id - Validate Marktlokations-ID (MaLo-ID): exactly 11 digits with BDEW check digit.
- validate_
malo_ or_ zahlpunkt - Validate either MaLo-ID or Zahlpunktbezeichnung format.
- validate_
max_ decimal_ places - Validate that a numeric string has at most
maxdecimal places. - validate_
max_ integer_ digits - Validate that a numeric string has at most
maxinteger digits (before decimal point). - validate_
max_ length - Validate maximum character length.
- validate_
mmddhhmm_ equals - Validate that a DTM value’s MMDDHHMM portion equals the expected value.
- validate_
nelo_ id - Validate Netzlokations-ID: “E” + ten alphanumerics (
E1688117482). - validate_
numeric - Validate a numeric value against a comparison.
- validate_
phone - Validate phone format: must start with ‘+’ followed by only digits.
- validate_
sr_ id - Validate Steuerbare-Ressource-ID (SR-ID): “C” + ten alphanumerics
(
C816417ST77). - validate_
timezone_ utc - Validate that a DTM value’s timezone portion is “+00” (UTC).
- validate_
tr_ id - Validate Transaktionsreferenz-ID (TR-ID): 1-35 alphanumeric characters.
- validate_
x509_ cert_ body - Validate an X.509 certificate body per BSI TR-03109-4.
- validate_
zahlpunkt - Validate Zahlpunktbezeichnung: exactly 33 alphanumeric characters.