{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular/issues/25182","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/25182/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/25182/comments","events_url":"https://api.github.com/repos/angular/angular/issues/25182/events","html_url":"https://github.com/angular/angular/issues/25182","id":345469379,"node_id":"MDU6SXNzdWUzNDU0NjkzNzk=","number":25182,"title":"How to validate disabled control using reactive forms (validation is not triggered)","user":{"login":"Furqanaa","id":26789979,"node_id":"MDQ6VXNlcjI2Nzg5OTc5","avatar_url":"https://avatars0.githubusercontent.com/u/26789979?v=4","gravatar_id":"","url":"https://api.github.com/users/Furqanaa","html_url":"https://github.com/Furqanaa","followers_url":"https://api.github.com/users/Furqanaa/followers","following_url":"https://api.github.com/users/Furqanaa/following{/other_user}","gists_url":"https://api.github.com/users/Furqanaa/gists{/gist_id}","starred_url":"https://api.github.com/users/Furqanaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Furqanaa/subscriptions","organizations_url":"https://api.github.com/users/Furqanaa/orgs","repos_url":"https://api.github.com/users/Furqanaa/repos","events_url":"https://api.github.com/users/Furqanaa/events{/privacy}","received_events_url":"https://api.github.com/users/Furqanaa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-28T18:31:41Z","updated_at":"2018-07-28T18:31:41Z","closed_at":null,"author_association":"NONE","body":"Let's say that I have this form structure:\r\n\r\n```\r\n      this.entryForm = this.formBuilder.group({\r\n            date: [{value:'' , disabled: true}, [Validators.required]],\r\n            notes: [''],\r\n            sum_credit: [{value:'', disabled: true }],   \r\n            sum_debit: [{value:'', disabled: true}],\r\n            items: this.initItems()\r\n          });\r\n// set validation function to sum_credit\r\n\r\n   this.entryForm.controls['sum_credit'].setValidators([CommonValidations.validateSomthing(...)]);\r\n```\r\nThe `sum_credit `is disabled because it's value is always calculated. Now I need to validate that the `sum_credit `is equaled to `sum_debit`, and I'm already doing that using `validateSomthing `function. The problem is that the `validateSomthing `is not triggered because the control is disabled. How can I fix that?\r\nThanks\r\n\r\n[StackOverFlow question.](https://stackoverflow.com/questions/51573707/how-to-validate-disabled-control-using-reactive-forms-validation-is-not-trigger)"}}
{"actor":{"display_login":"Furqanaa"}}