NG Absolute Form Validator - V14.0

Above

The Above rule makes sure the value entered by the user is greater than a specified minimum. It's a common check for numeric fields like age, price, quantity, or score, wherever the input needs to exceed a defined limit — for example, confirming a bid is above the current highest offer, or that a discount percentage is above zero. Both the submitted value and the comparison threshold are automatically converted to numbers before the check runs, so the rule works reliably whether the value arrives as a string or a number.

#Directive Code Snippet
<!DOCTYPE html> 
<html lang="en"> 
    ...
    <form (ngSubmit)="onSubmit(form)" #form="ngForm">
		<input [above]="<number>" 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]="above" type="text" name="<name>" [(ngModel)]="<name>" #<name>="ngModel">
        <ng-absolute-validator [formInstance]="<name>"></ng-absolute-validator>
	</form>
    ...
</html>
#Reactive Validation 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('above:20',<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>