NG Absolute Form Validator - V2.0

RequiredIf

Ensures the field under validation must be present and not empty if the anotherfield field is equal to any value. The Match with field must be define or initialized or placed before validated field.

#Directive Code Snippet
<!DOCTYPE html> 
<html lang="en"> 
    ...
    <form (ngSubmit)="onSubmit(form)" #form="ngForm">
		<input [requiredIf]="[<match_with_field>,<value>]" type="text" name="<name>" [(ngModel)]="<name>" #<name>="ngModel">
	</form>
    ...
</html>
#Chain Rule Code Snippet
<!DOCTYPE html> 
<html lang="en"> 
    ...
    <form (ngSubmit)="onSubmit(form)" #form="ngForm">
		<input [Rule]="required_if:<match_with_field>,<value>" type="text" name="<name>" [(ngModel)]="<name>" #<name>="ngModel">
	</form>
    ...
</html>