How to bypass angular validator?












0















I have created a chrome extension which copies address fields from my page and pastes it over the checkout page of other sites like amazon,homedepot etc.,
The issue comes in home depot website as its in angular the data gets pasted in the fields but still it displays the error of plese fill the field.
Here is my chrome extension code:-



function _0xd4fbx11hd() {
if(isChrome()){
chrome['storage']['sync']['get']('AmazonAtofill_buyer_name', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_buyer_name']) {
var name = _0x23fcx11['AmazonAtofill_buyer_name'].split(" ");

//$('.IsBestAnswer').addClass('bestanswer').removeClass('IsBestAnswer');

$('#firstName').val(name[0]);

if(name[1]){
$('#lastName').val(name[1]);
}else{
$('#lastName').val(name[0]);
}
}
});

chrome['storage']['sync']['get']('AmazonAtofill_phone_number', function(_0x23fcx11) {

if (_0x23fcx11['AmazonAtofill_phone_number']) {
$('#phone').val(_0x23fcx11['AmazonAtofill_phone_number']);
//enterAddressPhoneNumber['value'] = _0x23fcx11['AmazonAtofill_phone_number']
}
});

chrome['storage']['sync']['get']('AmazonAtofill_street1', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_street1']) {
$('#shippingAddress').val(_0x23fcx11['AmazonAtofill_street1']);
}
});
}

}


The code pastes the data over the website see by opening url.



https://prnt.sc/lhtxhy



error url:-



https://prnt.sc/lhty61



I hope you would get to understand the point from this as i have checked when i paste data via this the classes inside the html of the website does not change and while when i type the values they get updated like ng-untouched changes to ng-touched and so on i guess this the issue but i dont have any control over the website i just need to update those functionality with my extension at the time i paste the values in input box.










share|improve this question


















  • 1





    Have you seen this question about mocking a keyboard event ?

    – trichetriche
    Nov 13 '18 at 13:51
















0















I have created a chrome extension which copies address fields from my page and pastes it over the checkout page of other sites like amazon,homedepot etc.,
The issue comes in home depot website as its in angular the data gets pasted in the fields but still it displays the error of plese fill the field.
Here is my chrome extension code:-



function _0xd4fbx11hd() {
if(isChrome()){
chrome['storage']['sync']['get']('AmazonAtofill_buyer_name', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_buyer_name']) {
var name = _0x23fcx11['AmazonAtofill_buyer_name'].split(" ");

//$('.IsBestAnswer').addClass('bestanswer').removeClass('IsBestAnswer');

$('#firstName').val(name[0]);

if(name[1]){
$('#lastName').val(name[1]);
}else{
$('#lastName').val(name[0]);
}
}
});

chrome['storage']['sync']['get']('AmazonAtofill_phone_number', function(_0x23fcx11) {

if (_0x23fcx11['AmazonAtofill_phone_number']) {
$('#phone').val(_0x23fcx11['AmazonAtofill_phone_number']);
//enterAddressPhoneNumber['value'] = _0x23fcx11['AmazonAtofill_phone_number']
}
});

chrome['storage']['sync']['get']('AmazonAtofill_street1', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_street1']) {
$('#shippingAddress').val(_0x23fcx11['AmazonAtofill_street1']);
}
});
}

}


The code pastes the data over the website see by opening url.



https://prnt.sc/lhtxhy



error url:-



https://prnt.sc/lhty61



I hope you would get to understand the point from this as i have checked when i paste data via this the classes inside the html of the website does not change and while when i type the values they get updated like ng-untouched changes to ng-touched and so on i guess this the issue but i dont have any control over the website i just need to update those functionality with my extension at the time i paste the values in input box.










share|improve this question


















  • 1





    Have you seen this question about mocking a keyboard event ?

    – trichetriche
    Nov 13 '18 at 13:51














0












0








0








I have created a chrome extension which copies address fields from my page and pastes it over the checkout page of other sites like amazon,homedepot etc.,
The issue comes in home depot website as its in angular the data gets pasted in the fields but still it displays the error of plese fill the field.
Here is my chrome extension code:-



function _0xd4fbx11hd() {
if(isChrome()){
chrome['storage']['sync']['get']('AmazonAtofill_buyer_name', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_buyer_name']) {
var name = _0x23fcx11['AmazonAtofill_buyer_name'].split(" ");

//$('.IsBestAnswer').addClass('bestanswer').removeClass('IsBestAnswer');

$('#firstName').val(name[0]);

if(name[1]){
$('#lastName').val(name[1]);
}else{
$('#lastName').val(name[0]);
}
}
});

chrome['storage']['sync']['get']('AmazonAtofill_phone_number', function(_0x23fcx11) {

if (_0x23fcx11['AmazonAtofill_phone_number']) {
$('#phone').val(_0x23fcx11['AmazonAtofill_phone_number']);
//enterAddressPhoneNumber['value'] = _0x23fcx11['AmazonAtofill_phone_number']
}
});

chrome['storage']['sync']['get']('AmazonAtofill_street1', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_street1']) {
$('#shippingAddress').val(_0x23fcx11['AmazonAtofill_street1']);
}
});
}

}


The code pastes the data over the website see by opening url.



https://prnt.sc/lhtxhy



error url:-



https://prnt.sc/lhty61



I hope you would get to understand the point from this as i have checked when i paste data via this the classes inside the html of the website does not change and while when i type the values they get updated like ng-untouched changes to ng-touched and so on i guess this the issue but i dont have any control over the website i just need to update those functionality with my extension at the time i paste the values in input box.










share|improve this question














I have created a chrome extension which copies address fields from my page and pastes it over the checkout page of other sites like amazon,homedepot etc.,
The issue comes in home depot website as its in angular the data gets pasted in the fields but still it displays the error of plese fill the field.
Here is my chrome extension code:-



function _0xd4fbx11hd() {
if(isChrome()){
chrome['storage']['sync']['get']('AmazonAtofill_buyer_name', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_buyer_name']) {
var name = _0x23fcx11['AmazonAtofill_buyer_name'].split(" ");

//$('.IsBestAnswer').addClass('bestanswer').removeClass('IsBestAnswer');

$('#firstName').val(name[0]);

if(name[1]){
$('#lastName').val(name[1]);
}else{
$('#lastName').val(name[0]);
}
}
});

chrome['storage']['sync']['get']('AmazonAtofill_phone_number', function(_0x23fcx11) {

if (_0x23fcx11['AmazonAtofill_phone_number']) {
$('#phone').val(_0x23fcx11['AmazonAtofill_phone_number']);
//enterAddressPhoneNumber['value'] = _0x23fcx11['AmazonAtofill_phone_number']
}
});

chrome['storage']['sync']['get']('AmazonAtofill_street1', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_street1']) {
$('#shippingAddress').val(_0x23fcx11['AmazonAtofill_street1']);
}
});
}

}


The code pastes the data over the website see by opening url.



https://prnt.sc/lhtxhy



error url:-



https://prnt.sc/lhty61



I hope you would get to understand the point from this as i have checked when i paste data via this the classes inside the html of the website does not change and while when i type the values they get updated like ng-untouched changes to ng-touched and so on i guess this the issue but i dont have any control over the website i just need to update those functionality with my extension at the time i paste the values in input box.







javascript jquery angular google-chrome-extension






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 13:44









rahul shuklarahul shukla

17510




17510








  • 1





    Have you seen this question about mocking a keyboard event ?

    – trichetriche
    Nov 13 '18 at 13:51














  • 1





    Have you seen this question about mocking a keyboard event ?

    – trichetriche
    Nov 13 '18 at 13:51








1




1





Have you seen this question about mocking a keyboard event ?

– trichetriche
Nov 13 '18 at 13:51





Have you seen this question about mocking a keyboard event ?

– trichetriche
Nov 13 '18 at 13:51












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282393%2fhow-to-bypass-angular-validator%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282393%2fhow-to-bypass-angular-validator%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python