Weight with decimal places won’t validate
-
When I try to validate the field like this:
$_weight = absint( sanitize_text_field( $postdata['_weight'] ) );
to make sure the weight field isn’t empty, it gives me an error if the weight contains a decimal place in it, for example, 6 lbs. works, but .6 lbs. does not. Thank you for your help.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Weight with decimal places won’t validate’ is closed to new replies.