Popular recipes tagged "validation" but not "abc"http://code.activestate.com/recipes/tags/validation-abc/2013-08-12T14:11:25-07:00ActiveState Code RecipesValidate XML with schemaLocation (Python)
2013-03-28T10:24:55-07:00Mathias Loeschhttp://code.activestate.com/recipes/users/4185910/http://code.activestate.com/recipes/578503-validate-xml-with-schemalocation/
<p style="color: grey">
Python
recipe 578503
by <a href="/recipes/users/4185910/">Mathias Loesch</a>
(<a href="/recipes/tags/schema/">schema</a>, <a href="/recipes/tags/schemalocation/">schemalocation</a>, <a href="/recipes/tags/validation/">validation</a>, <a href="/recipes/tags/xml/">xml</a>).
Revision 3.
</p>
<p>Addresses problems described at:</p>
<p><a href="http://stackoverflow.com/questions/2979824/in-document-schema-declarations-and-lxml" rel="nofollow">http://stackoverflow.com/questions/2979824/in-document-schema-declarations-and-lxml</a>
<a href="https://mailman-mail5.webfaction.com/pipermail/lxml/2011-September/006153.html" rel="nofollow">https://mailman-mail5.webfaction.com/pipermail/lxml/2011-September/006153.html</a></p>
Credit card number check (Python)
2013-08-12T14:11:25-07:00Matt Joneshttp://code.activestate.com/recipes/users/4182764/http://code.activestate.com/recipes/578202-credit-card-number-check/
<p style="color: grey">
Python
recipe 578202
by <a href="/recipes/users/4182764/">Matt Jones</a>
(<a href="/recipes/tags/validation/">validation</a>).
Revision 2.
</p>
<p>Pass in the credit card number and the card type and get back a result with an explanation.</p>
Credit Card Validation (Python)
2011-08-11T19:06:58-07:00Stijn de Graafhttp://code.activestate.com/recipes/users/4178055/http://code.activestate.com/recipes/577838-credit-card-validation/
<p style="color: grey">
Python
recipe 577838
by <a href="/recipes/users/4178055/">Stijn de Graaf</a>
(<a href="/recipes/tags/card/">card</a>, <a href="/recipes/tags/credit/">credit</a>, <a href="/recipes/tags/false/">false</a>, <a href="/recipes/tags/number/">number</a>, <a href="/recipes/tags/testing/">testing</a>, <a href="/recipes/tags/true/">true</a>, <a href="/recipes/tags/validating/">validating</a>, <a href="/recipes/tags/validation/">validation</a>).
</p>
<p>Test validity of any credit card number using the LUHN method (mod 10).
Starting at the last digit and moving backwards, you add up every other digit.
Then, you double the left-out digits, and add the digits of these results to the original sum.
If this satisfies sum mod 10 == 0 then the card is valid.</p>
<p>This is also explained at <a href="http://www.beachnet.com/%7Ehstiles/cardtype.html" rel="nofollow">http://www.beachnet.com/~hstiles/cardtype.html</a></p>
HTTPS httplib Client Connection with Certificate Validation (Python)
2011-01-18T18:30:45-08:00Marcelo Fernándezhttp://code.activestate.com/recipes/users/4173551/http://code.activestate.com/recipes/577548-https-httplib-client-connection-with-certificate-v/
<p style="color: grey">
Python
recipe 577548
by <a href="/recipes/users/4173551/">Marcelo Fernández</a>
(<a href="/recipes/tags/certificate/">certificate</a>, <a href="/recipes/tags/client/">client</a>, <a href="/recipes/tags/client_server/">client_server</a>, <a href="/recipes/tags/httplib/">httplib</a>, <a href="/recipes/tags/https/">https</a>, <a href="/recipes/tags/networking/">networking</a>, <a href="/recipes/tags/ssl/">ssl</a>, <a href="/recipes/tags/validation/">validation</a>).
</p>
<p>Despite httplib.HTTPSConnection lets the programmer specify the client's pair of certificates, it doesn't force the underlying SSL library to check the server certificate against the client keys (from the client point of view).</p>
<p>This class allows to force this check, to ensure the python client is connecting to the right server.</p>
Validate ABNs (Australian Business Numbers) (Python)
2011-05-13T03:22:12-07:00Steven D'Apranohttp://code.activestate.com/recipes/users/4172944/http://code.activestate.com/recipes/577692-validate-abns-australian-business-numbers/
<p style="color: grey">
Python
recipe 577692
by <a href="/recipes/users/4172944/">Steven D'Aprano</a>
(<a href="/recipes/tags/abn/">abn</a>, <a href="/recipes/tags/validation/">validation</a>).
</p>
<p>This is a validation function for Australian Business Numbers (ABNs). It tests whether an integer or string is a valid ABN (but not whether it is a <em>legal</em> ABN, i.e. if it belongs to the person or business entity that is quoting it).</p>
Validate ACNs (Australian Company Numbers) (Python)
2011-05-13T03:15:35-07:00Steven D'Apranohttp://code.activestate.com/recipes/users/4172944/http://code.activestate.com/recipes/577691-validate-acns-australian-company-numbers/
<p style="color: grey">
Python
recipe 577691
by <a href="/recipes/users/4172944/">Steven D'Aprano</a>
(<a href="/recipes/tags/acn/">acn</a>, <a href="/recipes/tags/validation/">validation</a>).
</p>
<p>This is a validation function for Australian Company Numbers (ACNs). It tests whether the integer or string is a valid ACN (but not whether it is a <em>legal</em> ACN, i.e. if it belongs to the company that is quoting it).</p>
Simple Validation decorator (Python)
2010-03-26T06:54:47-07:00Shekhar Tiwatnehttp://code.activestate.com/recipes/users/2071240/http://code.activestate.com/recipes/577149-simple-validation-decorator/
<p style="color: grey">
Python
recipe 577149
by <a href="/recipes/users/2071240/">Shekhar Tiwatne</a>
(<a href="/recipes/tags/validation/">validation</a>).
</p>
<p>Validation decorator based on formencode package. It uses validation schemas.</p>