0

I am new to sfdc, Please ignore if any mistake.

I want to get the field so that I can add an error to it using setCustomValidity function.

‹lightning: input onchange="(c.handlePowerUpdate)"type="number"
value="{!cric.battingpower__c}"

aura:id="batPowerPV"
name="{!'PlayerType'+ nameId+'_'+country}"

I want to get the field to throw an error, I cannot directly throw the error using event.getSource() due to some dependency on another field. I cannot get it using aura:id as it will return a list.

I tried using querySelector but it did not work for me. Anyway, I get it using the name attribute as the name will get me the exact field I want to throw the error on.I want to get this in helper/controller

Like BatPowerField.SetCustom...

Thank you

Your Answer

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

Browse other questions tagged or ask your own question.