If you want to apply conditional validation on 'Birth Date' or 'Admission Date', then you need to add 'User Name' input as 'Bharat'
{{userFormGroup.controls.userName.errors.maxDate.message}}
you can enter MaxDate upto 30th july 2018
{{userFormGroup.controls.allocationDate.errors.maxDate.message}}
To apply the validation of Max Date on 'Admission Date' field, then enter the value 'Bharat' in 'User Name' textbox and you can enter maxDate as 30th july 2018
Conditional Expression with type 'string'
{{userFormGroup.controls.admissionDate.errors.maxDate.message}}
you can enter MaxDate upto 30th july 2018
Shows custom message.
{{userFormGroup.controls.registrationDate.errors.maxDate.message}}
you can enter MaxDate upto 30th july 2018
{{userFormGroup.controls.enrollmentDate.errors.maxDate.message}}
you can enter MaxDate upto value mentioned in fieldName
{{userFormGroup.controls.lastRegistrationDate.errors.maxDate.message}}
Enterred date must be less than the 30th July 2018
{{userFormGroup.controls.confirmationDate.errors.maxDate.message}}