Comments (18)
Ahh I've seen that one before, please try the development branch it was fixed @b3aaa8c0a37ef90552f88474ce58ab41b2fac4be or don't use findMessage() since that's where the problem is and getMessage() does not suffer the same.
@ed100 Well done now you've gone the full circle so I am keen to see your improvements next. If you don't feel you want to contribute code that is also fine. You obviously have a talent for finding everything possible thing may go wrong and your explanations are very concise and easy to follow. We desperately need a good tester like yourself to comb through the other projects as well if you would be so kind, much obliged.
I was also thinking that we should probably transfer what's been said on #84 to the documentation or start a FAQ to help the next person that comes around. Would you be keen to give us a hand?
No matter how small the contribution we always appreciate it. I cannot start to explain what a huge benefit it's been for us to go through the motions with you and reach a successful resolve.
Thank you very much! Keep up the good work...
from validation.
I will try the dev branch. I would be glad to help as soon as I finish
working on my site. Getting fairly close to having it done. I am not
much of a coder, but can read and write and break things.
On my second try I got the error:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in
/usr/websites/www/validationpage.html on line 11
that does not seem caused by findMessage.
On 08/16/2012 03:01 PM, Nick Lombard wrote:
Ahh I've seen that one before, please try the development branch it was fixed @b3aaa8c0a37ef90552f88474ce58ab41b2fac4be or don't use findMessage() since that's where the problem is and getMessage() does not suffer the same.
@ed100 Well done now you've gone the full circle so I am keen to see your improvements next. If you don't feel you want to contribute code that is also fine. You obviously have a talent for finding everything possible thing may go wrong and your explanations are very concise and easy to follow. We desperately need a good tester like yourself to comb through the other projects as well if you would be so kind, much obliged.
I was also thinking that we should probably transfer what's been said on #84 to the documentation or start a FAQ to help the next person that comes around. Would you be keen to give us a hand?
No matter how small the contribution we always appreciate it. I cannot start to explain what a huge benefit it's been for us to go through the motions with you and reach a successful resolve.
Thank you very much! Keep up the good work...
Reply to this email directly or view it on GitHub:
#85 (comment)
from validation.
Then break things it is! =) Always nice to know someone has your back. Glad to have you on board!
Let me know if that also fixes findMessages() for you, please.
from validation.
all I need is just the one file from dev branch:
AbstractNestedException.php
On 08/16/2012 03:54 PM, Nick Lombard wrote:
Then break things it is! =) Always nice to know someone has your back. Glad to have you on board!
Let me know if that also fixes findMessages() for you, please.
Reply to this email directly or view it on GitHub:
#85 (comment)
from validation.
I would just replace everything if I were you... just overwrite what is in the pear folder that should do the trick.
from validation.
replace it all with the files from
Respect-Validation-0.4.4-21-g0580308.tar.gz
tried:
try {
$usernameValidator->assert('really messed up screen#name');
} catch(\InvalidArgumentException $e) {
var_dump($e->findMessages('alnum', 'length', 'noWhitespace'));
}
Catchable fatal error: Argument 1 passed to
Respect\Validation\Exceptions\AbstractNestedException::findMessages()
must be of the type array, string given, called in
/usr/websites/www/validationpage.html on line 69 and defined in
/usr/local/share/pear/Respect/Validation/Exceptions/AbstractNestedException.php
on line 22
Now what should I do?
On 08/16/2012 04:10 PM, Nick Lombard wrote:
I would just replace everything if I were you... just overwrite what is in the pear folder that should do the trick.
Reply to this email directly or view it on GitHub:
#85 (comment)
from validation.
Give this one a go:
<?php
try {
$usernameValidator->assert('really messed up screen#name');
} catch(\InvalidArgumentException $e) {
var_dump($e->findMessages(array('alnum', 'length', 'noWhitespace')));
}
I am making this leap because findMessages has a type hint array see
<?php
public function findMessages(array $paths)
{
///
}
If that doesn't work then I will need to see what you are doing from declaring $usernameValidator up and until the end of the catch please.
from validation.
Made the needed corrections on README.md
, thanks for point that out @ed100.
from validation.
That does not give a parse error,
The var_dump is:
array(3) { ["alnum"]=> string(79) ""really messed up screen#name" must
contain only letters (a-z) and digits (0-9)" ["length"]=> string(66)
""really messed up screen#name" must have a length between 1 and 15"
["noWhitespace"]=> string(58) ""really messed up screen#name" must not
contain whitespace" }
I looked at the findMessges, and didn't understand what the $paths
meant. I don't remember seeing a function showing parameters as they
are in findMessages(array $paths) thought it was usually more like
findMessages(array,$paths) so I am just confused. I keep showing I an
not a coder.
What I am aiming for is displaying my error message to the use depending
on what is being validated and what the error is.
Then I will have code to end the page so they can fix their error.
On 08/16/2012 06:26 PM, Nick Lombard wrote:
Give this one a go:
<?php try { $usernameValidator->assert('really messed up screen#name'); } catch(\InvalidArgumentException $e) { var_dump($e->findMessages(array('alnum', 'length', 'noWhitespace'))); }I am making this leap because findMessages has a type hint array see
<?php public function findMessages(array $paths) { /// }If that doesn't work then I will need to see what you are doing from declaring $usernameValidator up and until the end of the catch please.
Reply to this email directly or view it on GitHub:
#85 (comment)
from validation.
You can try getFullMessag() or just getMessage() the latter will only have the last error and the first one will return a string with all errors =)
You are a coder after all =) just patience and more confidence it will come.
from validation.
@ed100 What's happening did you have success?
from validation.
not have time to work on it -- was very busy doing a few other things.
over the weekend will be time to work on it.
On 08/17/2012 02:44 PM, Nick Lombard wrote:
@ed100 What's happening did you have success?
Reply to this email directly or view it on GitHub:
#85 (comment)
from validation.
=)
from validation.
Hey @ed100, any news on this? Did that worked for you? Please let us know if you're having any problems =)
from validation.
findMessages() uses arrays!
$usernameValidator = Validator::alnum('_')->length(1,15)->noWhitespace();
try {
$usernameValidator->assert('really messed up screen#name');
} catch(\InvalidArgumentException $e) {
var_dump($e->findMessages(array('alnum', 'length', 'noWhitespace')));
}
Try this ;)
from validation.
Does this issue still valid? Can we close this?
from validation.
you can close it
Thanks for you help
On 12/18/2012 07:06 AM, Augusto Pascutti wrote:
Does this issue still valid? Can we close this?
Reply to this email directly or view it on GitHub:
#85 (comment)
from validation.
@ed100 Thank you for you feedback man! =D
from validation.
Related Issues (20)
- Translation from array HOT 3
- Respect\Stringifier\stringify() undefined function HOT 1
- Given a multirule validator, is there a usage pattern for testing a single rule? HOT 1
- ~~Why does v::containsAny(array('mod'))->validate('mode') return true?~~ Because the expected functionality is confused with In ( https://respect-validation.readthedocs.io/en/latest/rules/In/ ) HOT 1
- messages translate HOT 1
- define different error messages HOT 2
- Is there a roadmap or future plan for this repository? HOT 10
- filterVal not correct working with FILTER_VALIDATE_INT HOT 1
- CountryCode validation for Montenegro HOT 2
- IntVal: ctype_digit gives a deprecated notice in PHP 8.1 HOT 3
- ctype_digit deprecation notice HOT 1
- Release 2.2.4 HOT 2
- Roadmap to 2.3 HOT 13
- Code coverage in local environment HOT 2
- [documentaiton] Validation for a full array of data HOT 3
- Formatter inconsequently stringifies values HOT 6
- IBAN Validation with non-breaking spaces HOT 1
- How do custom validation rules throw custom error messages? HOT 2
- How to compare two field HOT 1
- DateTime validation fails on valid ISO-8601 timestamp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from validation.