0

In the example given about validating user inputs

you can see this line

inputCmp.set("v.errors", [{message:"Input not a number: " + value}]);

When I do the same I receive an access check error in the console. Even worse, when I activate the Security Control Setting in my Summer 16 Sandbox as described in the release notes. I receive an error message which breaks the functionality:

error

Is this the right behavior or is it a bug in the framework? Maybe related to this: Access Check Failed! on ui:inputText component event after Apex call

What should we do for those kind of errors for a productive application as we expect the customer to activate all security settings when Summer 16 is released?

  • when you look at the component reference section of the same documentation as mentioned above you can't find the errors attribute documented. So this means there is an inconsistency along the same documentation – Christian Menzinger May 18 '16 at 9:49
2

This issue has been fixed in this week's patch to Summer '16. The errors attribute is now correctly marked as access="global". Thanks for your patience.

|improve this answer|||||
  • does this works for lightning:input too? – Pranay Jaiswal Feb 13 '17 at 15:57
2

The dev team is currently discussing this so sit tight and I hope to have an update for you in the next week.

The issue is that the errors attribute wasn't marked with access="global" so it can't be used. This was an oversight as well as a doc bug. The most likely fix is that we will mark it access="global" (safe harbor) so your code will work without any changes.

This is an example of the access check critical update uncovering a bug so it's doing the right thing.

As with all critical updates, we recommend that you test this update in a sandbox or Developer Edition org to verify correct behavior before enabling it in your production org.

Apologies for the slow response to this. I'll update this thread when I get more info on the fix.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.