power-media / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

TRequiredFieldValidator should (automatically?) consider PromptValue as error. #451

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
TRequiredFieldValidator should (automatically?) consider PromptValue as error.

Right now i achieve the intended behavior by manually setting InitialValue.

Getting the value off of $this->getControlToValidate()->getPromptValue() 
shouldn't be too hard.

Thanks,
Raoul
PS. if we were using Github, i would be able to contribute more directly ;)

Original issue reported on code.google.com by ra...@bhatia.at on 16 Mar 2013 at 2:26

GoogleCodeExporter commented 8 years ago
Nice suggestion, thank you.
I'd say that if an InitialValue is explicitly specified in the validator, it 
will be used.
If no InitialValue has been specified and the controls inherits from 
TListControl, TRequiredFieldValidator will lookup if the control has a 
PromptValue set and use it as InitialValue.
My only question: is there any case where an user could like to avoid this 
behavior?

Original comment by ctrlal...@gmail.com on 17 Mar 2013 at 11:40

GoogleCodeExporter commented 8 years ago
Right now, i cannot think about any such case.
But maybe we should ask in the forums?

Original comment by ra...@bhatia.at on 20 Mar 2013 at 7:10

GoogleCodeExporter commented 8 years ago
So, how about adding this functionality? :)

Thanks,
Raoul

Original comment by ra...@bhatia.at on 21 Apr 2013 at 1:28

GoogleCodeExporter commented 8 years ago
Bumping this issue won't give us more free time to work on this. Patches are 
welcome.

Original comment by ctrlal...@gmail.com on 23 Apr 2013 at 7:45

GoogleCodeExporter commented 8 years ago
Oh - sorry!

I thought you are still not sure if such a feature should be integrated.
I'll see if i can provide something.

Cheers,
Raoul

Original comment by ra...@bhatia.at on 23 Apr 2013 at 8:03

GoogleCodeExporter commented 8 years ago
fixed in r3288

Original comment by ctrlal...@gmail.com on 30 Apr 2013 at 10:37