When business rules and validation collide ......



  • The Scene: A simple interface at a third party that you post an XML file to, to send SMS messages.



    The Validation: An (obviously not correct) mobile number of the maximum field length of 15 causes a rejection of the file.



    The Response:



    Them:"OK, we've figured it out. It's because when a 15 digit number is encountered our system assumes its international, and replaces the leading zero with +44. That makes it longer than the 15 character limit".



    Me:"..... so a number can never actually be 15 characters can it? Because it will always end up being too long after its been 'internationalised'"



    Them:"....."



    Me:"OK, I guess I'll change the limit to 13 characters then"



    I didn't touch on "what's the point of replacing the zero if you are only going to put the UK code in there anyway?", it didn't seem worth it.



    [disclaimer]Numbers come from an outside system which I have no control over, we don't apply any sort of format validation rules as we'd rather pay for undeliverable messages than risk false positives.[/disclaimer]





    [mod - inserted <br /> tags to restore sanity - PJH]



  • Whats the deal with the loss of newlines?



  • @LarryDavid said:

    Whats the deal with the loss of newlines?

    Welcome to Community Server. Enjoy your stay.



  • @LarryDavid said:

    Whats the deal with the loss of newlines?
    I have been wondering that myself! The editor used to have buttons, they are gone, so are the newlines.



  • @esoterik said:

    The editor used to have buttons, they are gone, so are the newlines.
     

    You switched from Firefox to Chrome!


Log in to reply