Actions
Bug #367
closedRegex for "validates_format_of" in Parameter model does not look right
Description
I have a parameter value with the value:
test value
However, I got a validation error because the following validation does not accept a variety of characters.
validates_format_of :name, :value, :with => /\A(\S+\s?)+\Z/, :message => "can't be blank or contain trailing white space"
It would be useful to have a more liberal validation like so:
validates_format_of :name, :value, :with => /^[\w\d\W]+$/, :message => "can't be blank or contain trailing white space"
So that the following lines can be accommodated:
* - nofile 65535%%* - nproc 65535
for /etc/security/limits.conf, for example.
Updated by Ohad Levy about 14 years ago
- Category set to Database
- Assignee set to Bash Shell
- Target version set to 0.1-6
Updated by Paul Kelly about 14 years ago
- Status changed from New to Ready For Testing
- Branch set to bug/367-validates_format_of-parameter
Oops! Sorry about this Bash Shell but I did this fix before I noticed that it was assigned to you. :-(
However I think that the re should be /^.*\S$/
Updated by Paul Kelly about 14 years ago
- % Done changed from 0 to 100
Applied in changeset 1f0c2f2ef54f77a3b559c8d2119168395c51ff44.
Updated by Paul Kelly about 14 years ago
- Status changed from Ready For Testing to Closed
Actions