Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option with "005" value can not be validated. #60

Closed
eusonlito opened this issue Apr 13, 2016 · 2 comments
Closed

Option with "005" value can not be validated. #60

eusonlito opened this issue Apr 13, 2016 · 2 comments

Comments

@eusonlito
Copy link
Contributor

Having this Select:

<select name="template">
    <option value="001">001</option>
    <option value="002">002</option>
    <option value="003">003</option>
    <option value="004">004</option>
    <option value="005">005</option>
    <option value="006">006</option>
    <option value="007">007</option>
</select>

Created with:

$templates = array();

foreach (glob(base_path('templates/*'), GLOB_ONLYDIR) as $template) {
    $templates[$template = basename($template)] = $template;
}

$form['template']->options($templates);

Can not be validated because https://github.com/oscarotero/form-manager/blob/master/src/Validators/Select.php#L29 say that this value not exists.

oscarotero added a commit that referenced this issue Apr 14, 2016
@oscarotero
Copy link
Owner

I added a commit to fix this. Can you check whether it works before release the patch?

oscarotero added a commit that referenced this issue Apr 14, 2016
@eusonlito
Copy link
Contributor Author

It's working like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants