Patch #13498
closedBetter validation for identifier length
0%
Description
Please see...
source:trunk/app/models/project.rb#L76
This could be clearer with minimum and maximum.
Example:
validates_length_of :identifier, :minimum => 1, :maximum => 100, :allow_blank => false
Updated by Mischa The Evil about 11 years ago
Daniel Felix wrote:
Please see...
source:trunk/app/models/project.rb#L76This could be clearer with minimum and maximum.
The current code is specifically done for easy changing the max. indentifier length. See #6446#note-12. I'd suggest to keep it like it is now.
Updated by Daniel Felix about 11 years ago
Ah okay.
But we'll the :maximum would achieve the same thing? There could be a reference to the variable too. :-)
Doesn't it?
What about the allow blank option?
Updated by Jean-Philippe Lang over 10 years ago
- Status changed from New to Closed
There's a min and max in the current implementation. I don't know how it was when this patch was submitted, please reopen if needed.