angular 自定义表单验证问题

表单中有建筑面积和出租面积
想要验证出租面积必须小于等于建筑面积应怎么写啊

小白求教

  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],
  });


陪伴而非守候
浏览 493回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Html5