0

I am getting "$Label.LightningControl.require doesn't exist" over the Tool Tip when setting lightning:input require="true" .

 <lightning:input type="text" 
     name="firstName" 
     required="true" 
     aura:id="firstName"
     label="First Name"
     value="{!v.firstName}" 
     messageWhenValueMissing="First name is required" >

enter image description here

  • Are you still getting this error? This error seems very weird to me. I tried the same code you have pasted and it seems to work for me. Is there any error in your browser console when you run this code? – RedDevil Jun 10 '17 at 10:13
  • This happens only when i put required = true. I am getting the error even now and i am using google chrome version 58.0.3029.96. Checked with IE as well, i am getting same error. – Niran N Jun 10 '17 at 10:28
  • 2
    Please don't try to beg for help. People will help you if they want to help you. – Martin Lezer Jun 12 '17 at 8:47
  • @MartinLezer Please learn how to post in a public post. No offence. I too will learn how to post without begging after this. Advice taken :) – Niran N Jun 12 '17 at 10:49
  • 1
    Lol what are you talking about? Here, in this community, it's not allowed to beg for help and to try to make your question more urgent than others. But if you want your questions to be closed, keep trying. – Martin Lezer Jun 12 '17 at 11:59
0

It might be due to a beta Version Component. Your code is working fine now, I am using Chrome version 58.0.3029.110 (64-bit).

ToolTip now displays (please fill out this field) instead of this $Label.LightningControl.require doesn't exist.

Sample code

<aura:application>
     <c:TestLightningInputComponent/>
</aura:application>

<aura:component>
<aura:attribute name="firstName" type="String" default="ABCD"/>
<lightning:input type="text" 
                 name="firstName" 
                 required="true" 
                 aura:id="firstName"
                 label="First Name"
                 value="{!v.firstName}" 
                 messageWhenValueMissing="First name is required"/>
</aura:component>

Helpful links - https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_input.htm

  • Welcome to Stack Exchange. Please do not leave a signature under your posts; that's just noise and and a link to your profile is automatically added by the system anyway. – Glorfindel Jun 14 '17 at 8:21
0

Try this code

<lightning:input type="text" 
     name="firstName" 
     required="true" 
     aura:id="firstName"
     label="First Name"
     value="{!v.firstName}" 
     messageWhenValueMissing="First name is required" />

and for more information go to this link : https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_input.htm

0

This error seems weird for me too. Are you able to re-produce this ?

I had the same issue in one of my org, but was not able to re-produce again. It occurred only once and disappeared.

It seems that there is some issue in the standard lightning. You got the issue while using lightning:input tag. I got this while using ui:inputSelect and ui:inputText

Hoping this would be fixed by Salesforce soon.

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.