NG Absolute Form Validator - V2.0

requiredWith

Ensure The field under validation must be present and not empty only if any of the other specified fields are present. The Match with fields 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 [requiredWith]="[<match_with_field>,<comma separate 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_with:<match_with_field>,<comma separate value>" type="text" name="<name>" [(ngModel)]="<name>" #<name>="ngModel">
	</form>
    ...
</html>