how do i restrict my entry to a certain format. eg. mm/yy
In that specific case I would encourage you to use date input -- http://docs.opendatakit.org/form-widgets/#date-and-time-widgets
You can also use a constraint with a regex
expression described at https://opendatakit.github.io/xforms-spec/#fn:regex. You can also search the forum for examples. In this case your regex would look something like \d\d\/\d\d
-- match two digits followed by a slash followed by two digits. This would also allow invalid dates such as 34/77
.
1 Like