Bug #39150
Missing validators for all type values of ElectronicAddress
Status: | Closed | Start date: | 2012-07-20 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Validation | |||
Target version: | - | |||
Affected Flow version: | FLOW3 1.1.0 rc 2 |
Description
The ElectronicAddress model of TYPO3.Party tries to validate all kind of address values during execution.
Due to missing validators, there will be an error message (no exception!) on a blank white page.
There are missing validators for electronic addresses as follows:
- Skype
- Aim
- Gizmo
- Icq
- Jabber (could be derived from EmailAddressValidator)
- Msn
- Sip
- Url
and
- Yahoo
Using user defined validators in non framework packages would be ignored due to model validation restriction. For type attribute there are only alphanummeric value allowed so specifying vendor names and packeges (Vendor\Package:Validator, i.e. MyCompany\MyPackage:Skype) wouldn't be possible.
But even when alphanumeric validator is removed from model, there will be an other error showing up: Object expected, string given.
As far as I know, it's thrown by \TYPO3\FLOW3\Validation\Validator\GenericObjectValidator->validate().
Associated revisions
[TASK] Add missing validators for ElectronicAddress types
Adds the needed validators and changes the ElectronicAddressValidator
so that it uses them.
Change-Id: If9ac540584816775ee56933b432d93cd20e0702d
Fixes: #39150
Releases: master
History
#1 Updated by Karsten Dambekalns about 3 years ago
- Project changed from TYPO3 Flow Base Distribution to TYPO3.Flow
#2 Updated by Karsten Dambekalns about 3 years ago
- Project changed from TYPO3.Flow to TYPO3.Party
#3 Updated by Karsten Dambekalns about 3 years ago
- Category set to Validation
#4 Updated by Karsten Dambekalns about 3 years ago
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
#5 Updated by Gerrit Code Review about 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13048
#6 Updated by Karsten Dambekalns about 3 years ago
- Status changed from Under Review to Needs Feedback
- Target version set to 1.1.1
Pushed a change that shows how it should work. Now the task would be to find out the rules for the various types and add validators as well as tests for all that.
Feel free to contribute!
#7 Updated by Steffen Wickham about 3 years ago
- File Skype_and_Url_Validator.patch added
I've modified your source code in SkypeAddressValidator.php a bit to match a really valid skype address. Skype help restricts usernames to characters and numbers but allows period and minus as valid characters too. Skype suggests usernames with period also.
I've added a validator for url's, too. It allows all kinds of http, https and ftp addresses with or without authentication credentials, domains, public accessible ip addresses (private blocks like 192.168.*.*, 10.*.*.* and so on are not allowed like in rfc suggested) and unicode characters like chinese characters in url. It is based on the "winning" regex from http://mathiasbynens.be/demo/url-regex.
SIP Validator will be commited tomorrow. Sorry for applying a patch but I've got some troubles with my git setup atm.
#8 Updated by Steffen Wickham about 3 years ago
- File SkypeAddressValidator.php added
Sorry, messed up the patch file. I really need more sleep...
You can find the modified version of SkypeAddressValidator.php attached.
#9 Updated by Gerrit Code Review about 3 years ago
- Status changed from Needs Feedback to Under Review
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13048
#10 Updated by Karsten Dambekalns about 3 years ago
I adjusted the Skype address validator as suggested.
#11 Updated by Karsten Dambekalns over 2 years ago
- Target version deleted (
1.1.1)
#12 Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13048
#13 Updated by Gerrit Code Review over 2 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13048
#14 Updated by Gerrit Code Review over 2 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13048
#15 Updated by Gerrit Code Review over 2 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13048
#16 Updated by Gerrit Code Review over 2 years ago
Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13048
#17 Updated by Gerrit Code Review over 2 years ago
Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13048
#18 Updated by Mattias Nilsson over 2 years ago
- Status changed from Under Review to Closed
- Assigned To deleted (
Karsten Dambekalns) - % Done changed from 0 to 100