Skip to content

Commit

Permalink
Change customerid from number to text (#98)
Browse files Browse the repository at this point in the history
* Update form definition of customerid to text type
* Remove number validation from customerid
  • Loading branch information
chrode committed Mar 30, 2023
1 parent 3cbb588 commit f3439a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions Classes/Domain/Validator/SubscriberValidator.php
Expand Up @@ -103,12 +103,6 @@ public function isValid($newSubscriber)
$this->addError('val_email', 1100);
$this->isValid = false;
}
if (strlen($newSubscriber->getCustomerid()) > 0 &&
filter_var($newSubscriber->getCustomerid(), FILTER_VALIDATE_INT) === false
) {
$this->addError('val_customerid', 1110);
$this->isValid = false;
}
if (strlen($newSubscriber->getNumber()) == 0 ||
filter_var($newSubscriber->getNumber(), FILTER_VALIDATE_INT) === false ||
$newSubscriber->getNumber() < 1
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/Subscriber/FormFields.html
Expand Up @@ -14,7 +14,7 @@
<label for="customerid">
<f:translate key="tx_slubevents_domain_model_subscriber.customerid"/>
</label>
<f:form.textfield id="customerid" type="number" additionalAttributes="{min: '1', max: '9999999'}" readonly="{readonly}"
<f:form.textfield id="customerid" type="text" readonly="{readonly}"
property="customerid"/><br/>

<label for="number">
Expand Down

0 comments on commit f3439a2

Please sign in to comment.