Angular Custom form validation question

there are floor area and rented area in the form
how to verify that the rented area must be less than or equal to the floor area

Xiaobai asks for advice

  add = this.form.group({
    buildingId: [null, [Validators.required]],
    roomNo: [null, [Validators.required]],
    roomResourceType: ["1"],
    roomBuildAcreage: [null, [Validators.required]],
    roomEquipments: [null],
    roomDecorateState: ["1"],
    roomRentedAcreage: [null, [Validators.required, this.validateRentedAcreage,rentedAcreageValidator(add)]],
    roomResourceState: ["1", [Validators.required]],
    isCharge: ["1", [Validators.required]],
    heatingCost: [null, [Validators.required]],
    roomDesc: [null],
  });
Jan.11,2022

give me a rough idea:


roomBuildAcreageroomRentedAcreage<br>

 this.form.get('roomBuildAcreage').valueChanges
      .subscribe((acreage: number) => {
           this.form.get('roomRentedAcreage').setValidators(Validators.max(acreage))
      })

the interface is based on the invalid prompt of control

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8bd5c-1087.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8bd5c-1087.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?