@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
2727.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
2828.in \\n[ rst2man-indent\\n[ rst2man-indent-level ] ]u
2929..
30- .TH "VALIDATORS" "1" "Jul 08 , 2024" "0.31.0 " "validators"
30+ .TH "VALIDATORS" "1" "Jun 17 , 2024" "0.28.3 " "validators"
3131.SH NAME
3232validators \- Python Data Validation for Humans™
3333.sp
@@ -215,6 +215,39 @@ If neither \fImin_val\fP nor \fImax_val\fP is provided, result will always be \f
215215.UNINDENT
216216.UNINDENT
217217.UNINDENT
218+ .SS btc_address
219+ .INDENT 0.0
220+ .TP
221+ .B validators.btc_address.btc_address(value: str, /)
222+ Return whether or not given value is a valid bitcoin address.
223+ .sp
224+ Full validation is implemented for P2PKH and P2SH addresses.
225+ For segwit addresses a regexp is used to provide a reasonable
226+ estimate on whether the address is valid.
227+ .sp
228+ Examples
229+ .sp
230+ .nf
231+ .ft C
232+ >>> btc_address(\(aq 3Cwgr2g7vsi1bXDUkpEnVoRLA9w4FZfC69\(aq )
233+ # Output: True
234+ >>> btc_address(\(aq 1BvBMsEYstWetqTFn5Au4m4GFg7xJaNVN2\(aq )
235+ # Output: ValidationError(func=btc_address, args=...)
236+ .ft P
237+ .fi
238+ .INDENT 7.0
239+ .TP
240+ .B Parameters
241+ \fB value \fP \-\- Bitcoin address string to validate.
242+ .TP
243+ .B Returns
244+ If \fI value \fP is a valid bitcoin address.
245+ (ValidationError): If \fI value \fP is an invalid bitcoin address.
246+ .TP
247+ .B Return type
248+ (Literal[True])
249+ .UNINDENT
250+ .UNINDENT
218251.SS card
219252.INDENT 0.0
220253.TP
@@ -589,99 +622,6 @@ If \fIvalue\fP is a valid cron string.
589622(Literal[True])
590623.UNINDENT
591624.UNINDENT
592- .SS crypto_addresses
593- .INDENT 0.0
594- .TP
595- .B validators.crypto_addresses.btc_address(value: str, /)
596- Return whether or not given value is a valid bitcoin address.
597- .sp
598- Full validation is implemented for P2PKH and P2SH addresses.
599- For segwit addresses a regexp is used to provide a reasonable
600- estimate on whether the address is valid.
601- .sp
602- Examples
603- .sp
604- .nf
605- .ft C
606- >>> btc_address(\(aq 3Cwgr2g7vsi1bXDUkpEnVoRLA9w4FZfC69\(aq )
607- # Output: True
608- >>> btc_address(\(aq 1BvBMsEYstWetqTFn5Au4m4GFg7xJaNVN2\(aq )
609- # Output: ValidationError(func=btc_address, args=...)
610- .ft P
611- .fi
612- .INDENT 7.0
613- .TP
614- .B Parameters
615- \fB value \fP \-\- Bitcoin address string to validate.
616- .TP
617- .B Returns
618- If \fI value \fP is a valid bitcoin address.
619- (ValidationError): If \fI value \fP is an invalid bitcoin address.
620- .TP
621- .B Return type
622- (Literal[True])
623- .UNINDENT
624- .UNINDENT
625- .INDENT 0.0
626- .TP
627- .B validators.crypto_addresses.eth_address(value: str, /)
628- Return whether or not given value is a valid ethereum address.
629- .sp
630- Full validation is implemented for ERC20 addresses.
631- .sp
632- Examples
633- .sp
634- .nf
635- .ft C
636- >>> eth_address(\(aq 0x9cc14ba4f9f68ca159ea4ebf2c292a808aaeb598\(aq )
637- # Output: True
638- >>> eth_address(\(aq 0x8Ba1f109551bD432803012645Ac136ddd64DBa72\(aq )
639- # Output: ValidationError(func=eth_address, args=...)
640- .ft P
641- .fi
642- .INDENT 7.0
643- .TP
644- .B Parameters
645- \fB value \fP \-\- Ethereum address string to validate.
646- .TP
647- .B Returns
648- If \fI value \fP is a valid ethereum address.
649- (ValidationError): If \fI value \fP is an invalid ethereum address.
650- .TP
651- .B Return type
652- (Literal[True])
653- .UNINDENT
654- .UNINDENT
655- .INDENT 0.0
656- .TP
657- .B validators.crypto_addresses.trx_address(value: str, /)
658- Return whether or not given value is a valid tron address.
659- .sp
660- Full validation is implemented for TRC20 tron addresses.
661- .sp
662- Examples
663- .sp
664- .nf
665- .ft C
666- >>> trx_address(\(aq TLjfbTbpZYDQ4EoA4N5CLNgGjfbF8ZWz38\(aq )
667- # Output: True
668- >>> trx_address(\(aq TR2G7Rm4vFqF8EpY4U5xdLdQ7XgJ2U8Vd\(aq )
669- # Output: ValidationError(func=trx_address, args=...)
670- .ft P
671- .fi
672- .INDENT 7.0
673- .TP
674- .B Parameters
675- \fB value \fP \-\- Tron address string to validate.
676- .TP
677- .B Returns
678- If \fI value \fP is a valid tron address.
679- (ValidationError): If \fI value \fP is an invalid tron address.
680- .TP
681- .B Return type
682- (Literal[True])
683- .UNINDENT
684- .UNINDENT
685625.SS domain
686626.INDENT 0.0
687627.TP
@@ -784,62 +724,6 @@ If \fIvalue\fP is a valid eMail.
784724.SS encoding
785725.INDENT 0.0
786726.TP
787- .B validators.encoding.base16(value: str, /)
788- Return whether or not given value is a valid base16 encoding.
789- .sp
790- Examples
791- .sp
792- .nf
793- .ft C
794- >>> base16(\(aq a3f4b2\(aq )
795- # Output: True
796- >>> base16(\(aq a3f4Z1\(aq )
797- # Output: ValidationError(func=base16, args={\(aq value\(aq : \(aq a3f4Z1\(aq })
798- .ft P
799- .fi
800- .INDENT 7.0
801- .TP
802- .B Parameters
803- \fB value \fP \-\- base16 string to validate.
804- .TP
805- .B Returns
806- If \fI value \fP is a valid base16 encoding.
807- (ValidationError): If \fI value \fP is an invalid base16 encoding.
808- .TP
809- .B Return type
810- (Literal[True])
811- .UNINDENT
812- .UNINDENT
813- .INDENT 0.0
814- .TP
815- .B validators.encoding.base32(value: str, /)
816- Return whether or not given value is a valid base32 encoding.
817- .sp
818- Examples
819- .sp
820- .nf
821- .ft C
822- >>> base32(\(aq MFZWIZLTOQ======\(aq )
823- # Output: True
824- >>> base32(\(aq MfZW3zLT9Q======\(aq )
825- # Output: ValidationError(func=base32, args={\(aq value\(aq : \(aq MfZW3zLT9Q======\(aq })
826- .ft P
827- .fi
828- .INDENT 7.0
829- .TP
830- .B Parameters
831- \fB value \fP \-\- base32 string to validate.
832- .TP
833- .B Returns
834- If \fI value \fP is a valid base32 encoding.
835- (ValidationError): If \fI value \fP is an invalid base32 encoding.
836- .TP
837- .B Return type
838- (Literal[True])
839- .UNINDENT
840- .UNINDENT
841- .INDENT 0.0
842- .TP
843727.B validators.encoding.base58(value: str, /)
844728Return whether or not given value is a valid base58 encoding.
845729.sp
0 commit comments