Giter VIP home page Giter VIP logo

bzgmailgunemailvalidation's Issues

Add request timeout property

Hi! In your code I saw that you are using a fixed timeout of 3 seconds for connecting MailGun. In practice, I can say that when my cellular connection was just a bit not ideal, though quite stable, the validator frequently failed. It seems, 3 seconds are often not enough. Though making it much longer would disturb the user, of course... So, maybe you could add timeout as another validator property?
Thank you for a great API though!

Move from main queue

How to move the success and failure blocks from the main queue. Can you give please give a solution

Uneven response when typed fast.

Scenerio : When typing is fast then the response which comes is uneven

i.e shrawan.com response is is_valid = false and did_you_mean is "shrawan.com"

and the response of shrawan.co is is_valid = true and did_you_mean is nil

Type : shrawan.com fast in app and call email Validation API

Log Trace

2017-03-08 11:42:13.254392 TextValidation[2261:547905] **didYouMean== [email protected] --- && isValid 0 **
2017-03-08 11:42:13.536171 TextValidation[2261:547905] **didYouMean== (null) --- && isValid 1 **
2017-03-08 11:42:14.446487 TextValidation[2261:547905] **didYouMean== [email protected] --- && isValid 0

So last log is isValid is 0 . Which is wrong and must be isValid is true

Demo app
Generate above scenerio

Doesn't actually return failure

Cool class that I appreciated, but it passed success every time as there is not an if statement to display the failure if the is_valid key is 0.

I just added this that might help you finish this out.

 if(isValid == YES) {
                                           dispatch_async(dispatch_get_main_queue(), ^{
                                               success(isValid, didYouMean);
                                           });
                                       } else {
                                           NSError *errorVal = nil;
                                           dispatch_async(dispatch_get_main_queue(), ^{
                                               failure(errorVal);
                                           });
                                       }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.