Re: [w3c/payment-request] Add PaymentResponse.onpayerdetailchange (#724)

> What would be your suggested good practice for figuring out which thing changed?

There is not way to detect which changed, just revalidate. So the question is mostly around validation of these values... 

```JS
response.onpayerdetailchange = ev => {
    const errors = {};
    const { payerName, payerEmail, payerPhone } = response; 
    object.assign(
       errors, validateEmail(payerEmail), validateName(payerName), validatePhone(payerPhone) 
    );
   if(Object.getOwnPropertyNames(x).length){
      response.retry(errors);
   }
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/724#issuecomment-397443718

Received on Thursday, 14 June 2018 21:27:51 UTC