NG Absolute Form Validator - V14.1

RequiredWithoutAll

The Required Without All rule makes a field mandatory only when every field in a given set is missing — required_without_all:requiredWithoutAll_1,requiredWithoutAll_2 means the current field must be filled in only if both requiredWithoutAll_1 and requiredWithoutAll_2 are absent, not just one of them. It's the stricter counterpart to Required Without, useful for a genuine last-resort fallback field, such as requiring an 'other, please specify' text field only when neither a 'preferred contact method' dropdown nor a 'referral source' field was filled in. As with the other conditional-required rules, every field being watched needs to be defined or initialized before the field that depends on it.

#Directive Code Snippet
<!DOCTYPE html> 
<html lang="en"> 
    ...
    <form (ngSubmit)="onSubmit(form)" #form="ngForm">
		<input requiredWithoutAll="<TARGET_FIELDS>" type="text" name="<name>" [(ngModel)]="<name>" #<name>="ngModel">
        <ng-absolute-validator [formInstance]="<name>"></ng-absolute-validator>
	</form>
    ...
</html>
#Chain Rule Code Snippet
<!DOCTYPE html> 
<html lang="en"> 
    ...
    <form (ngSubmit)="onSubmit(form)" #form="ngForm">
		<input rule="required_without_all:<TARGET_FIELDS>" type="text" name="<name>" [(ngModel)]="<name>" #<name>="ngModel">
        <ng-absolute-validator [formInstance]="<name>"></ng-absolute-validator>
	</form>
    ...
</html>
#Reactive Form Code Snippet
//component.ts 
export class ReactiveComponent{

	public form  !: FormGroup;

  	constructor(
      	private fb : FormBuilder,
		private rv : ReactiveValidator,
	){this.generteForm()}

	generteForm(){
		this.form = this.fb.group({
			<name> : ['',this.rv.map('required_without_all:<TARGET_FIELDS>',<CUSTOM_MESSAGE>)]
		})
	}
}

//component.html 
<!DOCTYPE html> 
<html lang="en"> 
    ...
    <form [formGroup]="form">
		<input type="text" name="<name>" formControlName="<name>">
        <ng-absolute-validator [formInstance]="form.get(<name>)"></ng-absolute-validator>
	</form>
    ...
</html>