Number constraints

FYI all, the behavior between ODK Collect (aka javaRosa) and Enketo differs significantly regarding the necessity of start/end string delimiters; see https://github.com/getodk/javarosa/issues/531 for the gory details… So depending on which client you happen to use, a regex without ‘^’ and ‘$’ may or may not behave as intended.

Strictly speaking, almost universally regex’s perform a partial match (ie any substring), so I always explicitly put them in when I actually want to check the entire string [otherwise YMMV].

2 Likes