From 2e0e17f21b868fe0c1a3a4d2d179ba8545dda864 Mon Sep 17 00:00:00 2001 From: Gabeahz Date: Wed, 26 Nov 2025 14:17:27 -0800 Subject: [PATCH] Improved regex in _validate_value() that checks user input for partition value and unit. - Allows for white space in between groups, aligning better with displayed example. - Removed unneeded | symbol, which was checking as literal rather than working as "or %" --- archinstall/lib/disk/partitioning_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/disk/partitioning_menu.py b/archinstall/lib/disk/partitioning_menu.py index baac9f7745..49e69bc20f 100644 --- a/archinstall/lib/disk/partitioning_menu.py +++ b/archinstall/lib/disk/partitioning_menu.py @@ -437,7 +437,7 @@ def _validate_value( max_size: Size, text: str, ) -> Size | None: - match = re.match(r'([0-9]+)([a-zA-Z|%]*)', text, re.I) + match = re.match(r'^\s*([0-9]+)\s*([a-zA-Z%]*)\s*$', text, re.I) if not match: return None