Grails

url constraint does not accept http://localhost as a valid URL

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.2
  • Component/s: Scaffolding
  • Labels:
    None

Description

When creating a domain object with a member that has a url:true constraint added to it, http://localhost is not accepted as a valid url type. This is a bit tricky to avoid during development and testing.

eg:
class TestUrl {
def someUrl

static constraints = { someUrl(url:true) }
}

Test:

TestUrl obj = new TestUrl()
obj.url = "http://localhost"

obj.validate() returns false!!

Activity

Hide
Sergey Nebolsin added a comment -

This is by-design. The following construction works fine:

   someUrl(url:"localhost")

See GRAILS-1692 for explanations.

Show
Sergey Nebolsin added a comment - This is by-design. The following construction works fine:
   someUrl(url:"localhost")
See GRAILS-1692 for explanations.
Hide
Graeme Rocher added a comment -

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - Bulk closing bunch of resolved issues

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: