yiisoft / yiisoft/validator

http://localhost/ is not valid url for UrlValidator

Open
#4 14 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status:ready for adoption type:enhancement
Dominant language
PHP
Stars
167
Forks
47
Avg merge
1d 19h
Merged PRs (30d)
3

Description

Not sure it is by design or bug if bug i can create a PR.

What steps will reproduce the problem?
$val = new UrlValidator;
$result = $val->validate('http://localhost/');
What is the expected result?

true

What do you get instead?

false

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the UrlValidator entry point and reproduce the reported result for http://localhost/. Read the existing issue discussion to determine whether localhost should be accepted, then verify the chosen behavior with coverage for this URL case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.