I need to validate that users to input a valid participant ID with 3 dashes, but the ID does not have a fixed length of integers. e.g these are valid IDs.
- 154-12-9-1
- 1-1-7-12
- 12-100-5-1
- 14-10-3-2017
The first set is the Village ID, secondly is the Compound ID, third set is Household ID, 4th is the Member ID.
Challenge 1: I don't have control on the ID length, but it has to have four sets of integers separated by hypen (-)
Rules:
1.Village code a a maximum value of 999(Length of 1-3 digits)
2.Compound code maximum value of 999 (Length of 1-3 digits)
3.Households code maximum value is 9 ( Households cannot exceed 9 in a compound (Length of 1 digit)) - Member code can have maximum of 9999(Length of 1-4 digits)
Anyone with idea(S)?