Skip to content
Discussion options

You must be logged in to vote

We don't strictly disallow using 2 fields with the same id (as long as the SHOW conditions are mutually exclusive, the UI won't break), it's just that not all the functionalities have been tested with it (e.g. referring such fields in advanced search, summary page etc.).

On a separate note, the above example can probably be merged together if we use this conditional for validating the foundling age:

or(
  not(field('child.placeOfBirth').isEqualTo(PlaceOfBirth.FOUNDLING)),
  not(field('child.dob').isBefore().days(1826).inPast())
)

which in fact is equivalent to

not(
  and(
    field('child.placeOfBirth').isEqualTo(PlaceOfBirth.FOUNDLING),
    field('child.dob').isBefore().days(1826).inPas…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@euanmillar
Comment options

@Zangetsu101
Comment options

Answer selected by Naveen1401
@Naveen1401
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants