Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* od Martin Šturcel */
- /* Validace zda je zadáno číslo popisné v adrese v pokladně */
- add_action( 'woocommerce_after_checkout_validation', 'mpca86_validate_address_1', 10, 2);
- function mpca86_validate_address_1( $fields, $errors ){
- if ( ! preg_match( '/[0-9]/', $fields[ 'billing_address_1' ] ) ){
- $errors->add( 'validation', 'V poli ulice jste nezadali číslo popisné. Je adresa správně?' );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement