Improved regex in _validate_value() that checks user input for partition value and unit. (#3952)
- 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 %"
This commit is contained in:
parent
d7e5dc3692
commit
7732d50016
|
|
@ -437,7 +437,7 @@ class PartitioningList(ListManager[DiskSegment]):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue