Angualr4 Custom form validation question

  add = this.form.group({
    buildingNo: [null, [Validators.required]],
    roomNo: [null, [Validators.required]],
    roomResourceType: ["1", [Validators.required]],
    roomBuildAcreage: [null, [Validators.required]],
    roomEquipments: [null, [Validators.required]],
    roomDecorateState: ["1", [Validators.required]],
    roomRentedAcreage: [null, [Validators.required]],
    roomResourceState: ["1", [Validators.required]],
    roomDesc: [null],
  });

now you want to verify that roomBuildAcreage must be greater than or equal to roomRentedAcreage. How to write custom verification

Xiaobai asks for advice

Sep.28,2021

add a custom function after roomBuildAcreage, and take out the roomRentedAcreage in it for comparison. If you do not meet the conditions, an error will be returned. That's fine

.
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-1befdc6-31ca8.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-1befdc6-31ca8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?