diff --git a/uc_product/tests/uc_product.test b/uc_product/tests/uc_product.test index 9de3eea5..c7786ab1 100644 --- a/uc_product/tests/uc_product.test +++ b/uc_product/tests/uc_product.test @@ -169,10 +169,10 @@ class UbercartProductTestCase extends UbercartTestHelper { // Check invalid quantity messages. $this->backdropPost('node/' . $this->product->nid, array('qty' => 'x'), 'Add to cart'); - $this->assertText('The quantity must be an integer.'); + $this->assertText('The quantity must be zero or a positive whole number.'); $this->backdropPost('node/' . $this->product->nid, array('qty' => '1a'), 'Add to cart'); - $this->assertText('The quantity must be an integer.'); + $this->assertText('The quantity must be zero or a positive whole number.'); // Check cart add message. $this->backdropPost('node/' . $this->product->nid, array('qty' => '1'), 'Add to cart'); diff --git a/uc_store/uc_store.module b/uc_store/uc_store.module index 6263cef9..3e3ef7e0 100644 --- a/uc_store/uc_store.module +++ b/uc_store/uc_store.module @@ -565,7 +565,7 @@ function uc_store_validate_number(&$element, &$form_state) { */ function uc_store_validate_uc_quantity(&$element, &$form_state) { if (!preg_match('/^\d+$/', $element['#value'])) { - form_error($element, t('The quantity must be an integer.')); + form_error($element, t('The quantity must be zero or a positive whole number.')); } elseif (empty($element['#allow_zero']) && !$element['#value']) { form_error($element, t('The quantity cannot be zero.'));