--To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/PTHVPLK3RBgJ.
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
This seems to not work anymore - is there an alternative way to set the required bit conditionally?
This works with the setting of it, but does not remove it if the condition is met.
http://jsfiddle.net/vaiism/KgYeF/
Thanks!
On Mar 5, 2012, at 4:45 PM, Igor Minar wrote:
> just bind to required attribute: http://jsfiddle.net/CHVbb/208/
>
> On Mon, Mar 5, 2012 at 12:43 PM, Johan Steenkamp <johan.s...@gmail.com> wrote:
> If it was possible to know when a template has completed loading (not using ng:include - using $route) using $(selector).remove() would work perfectly since the elements can have required attribute. If removed they have no effect on validation.
>
> Johan
>
>
> On Monday, March 5, 2012 9:43:05 PM UTC+13, Johan Steenkamp wrote:
> How can I make required optional for a form input. Scenario - radio button yes/no enables a text field, if field is enabled it is required. nd:disabled works great for enable/disable however even if disabled the form filed is still seen as required by the validation.
>
> Thanks
--
Robert B. Weeks
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/m4AeAFNFPLAJ.
Pete
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/s5A95Q3fjK0J.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
> In 1.0.0rc4 it change to ng-required so you need
>
> ng-required="shouldBeRequired"
>
> http://jsfiddle.net/johans/KgYeF/4/
doh! - that is how they were in our code originally (0.10.5) and I couldn't seem to get to work. Now they do. Must be sunspots.
Thanks for sending and sending the commit/bug for reference..
> These also changed:
>
> ng-multiple
> ng-selected
> ng-checked
> ng-disabled
> ng-required
>
>
> On Friday, April 13, 2012 1:10:17 AM UTC+12, Robert B. Weeks wrote:
> Hello -
> This seems to not work anymore - is there an alternative way to set the required bit conditionally?
>
> This works with the setting of it, but does not remove it if the condition is met.
>
> http://jsfiddle.net/vaiism/KgYeF/
>
> Thanks!
--
Robert B. Weeks