Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Added minlength to the validTagAttributes array on multiple elements #211

Merged

Conversation

rolandoisidoro
Copy link
Contributor

This PR refers to issue #206. It will allow developers to set minlength attribute on text, email, search, password, tel and url form elements, which will enable HTML5 minimum length validation.

@froschdesign
Copy link
Member

@rolandoisidoro
Please extend also the unit tests. Example:

public function validAttributes()
{
return [
['name', 'assertContains'],
['accept', 'assertNotContains'],
['alt', 'assertNotContains'],
['autocomplete', 'assertContains'],
['autofocus', 'assertContains'],
['checked', 'assertNotContains'],
['dirname', 'assertContains'],
['disabled', 'assertContains'],
['form', 'assertContains'],
['formaction', 'assertNotContains'],
['formenctype', 'assertNotContains'],
['formmethod', 'assertNotContains'],
['formnovalidate', 'assertNotContains'],
['formtarget', 'assertNotContains'],
['height', 'assertNotContains'],
['list', 'assertContains'],
['max', 'assertNotContains'],
['maxlength', 'assertContains'],
['min', 'assertNotContains'],
['multiple', 'assertNotContains'],
['pattern', 'assertContains'],
['placeholder', 'assertContains'],
['readonly', 'assertContains'],
['required', 'assertContains'],
['size', 'assertContains'],
['src', 'assertNotContains'],
['step', 'assertNotContains'],
['value', 'assertContains'],
['width', 'assertNotContains'],
];
}

…tes tests for text, email, password, tel and url element view helpers.
@rolandoisidoro
Copy link
Contributor Author

@froschdesign , just extended the tests you mentioned before and added missing tests for FormSearchViewHelper.

@weierophinney weierophinney added this to the 2.13.0 milestone Dec 11, 2018
@weierophinney weierophinney merged commit 0e3d167 into zendframework:develop Dec 11, 2018
weierophinney added a commit that referenced this pull request Dec 11, 2018
Added minlength to the validTagAttributes array on multiple elements
weierophinney added a commit that referenced this pull request Dec 11, 2018
weierophinney added a commit that referenced this pull request Dec 11, 2018
@weierophinney
Copy link
Member

Thanks, @rolandoisidoro!

@rolandoisidoro rolandoisidoro deleted the minlength-attribute branch December 12, 2018 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants