Add regex check with tests
Move val_scalar? from rule to check