Download & Extend

Add element_validate_integer_positive() validation for text_field_formatter_settings_form() trim_length

Project:Drupal core
Version:8.x-dev
Component:text.module
Category:bug report
Priority:normal
Assigned:nick_schuch
Status:closed (duplicate)
Issue tags:needs backport to D7, Needs tests, Novice

Issue Summary

It is follow-up from #1300920-72: The [node:summary] token does not output anything for body fields without a manual summary

Text widget already converted into plugin so it's a Novice task

Comments

#1

Issue tags:+needs backport to D7

Won't it need a backport to D7?

#2

Status:active» needs review

Could someone please review my patch? Thanks! :)

NOTE: Patch made at Drupal Camp Central America 2012.

AttachmentSizeStatusTest resultOperations
added_elemente_validate_integer_positive__for__trim_lenght-1808942-2.patch582 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 42,188 pass(es).View details | Re-test

#3

Status:needs review» needs work

@Brolag great! now we need a test to make sure that it works properly
Suppose this code should be modified to assert a wrong (none-numberic) value

#4

Status:needs work» needs review

Tried to kick off some tests but looks like core has moved on since this last patch. So here is the new one :)

AttachmentSizeStatusTest resultOperations
added_elemente_validate_integer_positive__for__trim_lenght-1808942-4.patch779 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 42,815 pass(es).View details | Re-test

#5

Great! Is it possible to create 2 patches: one with only modified test (this patch is supposed to fail, and that's ok), and the second one, which contains validation and test modification?

#6

Status:needs review» needs work

sorry, forgot to change status

#7

Assigned to:Anonymous» nick_schuch

Working on tests.

#8

Status:needs work» closed (duplicate)

After writing tests and pulling down the lastest 8.x I discovered that element_validate_positive_integer has been taken away in place of a number field with '#min' set to 1.

nobody click here