http://qs321.pair.com?node_id=1107624


in reply to Re^4: Perl6::Form Issues with Zero-Padding and Declarative Width (integer)
in thread Perl6::Form Issues with Zero-Padding and Declarative Width

Ah, I see the source of confusion. I think you're mixing up Imperative field widths with what you're using, Declarative field widths.

Here's another field specification example to make things clear:

{>>>>>>>>>>>>>>>>>>}

That is a field of 20 characters. That's the actual specification, no "(20)" in there at all. Adding the "(20)" doesn't change the width at all.. if you put in a "(7)" it wouldn't change the width either. But when the form is validated, the first one would pass, and the second would generate an error. This has nothing to do with _setting_ the width of the field, only validating that you've typed it in correctly with no missing or added characters.

Now if you don't want to type all those characters you can use the Imperative field width syntax using curly brackets:

{>{20}>}

This forces the field width to be 20 characters wide, so it is another way that has duplicate functionality to the first example.

HTH.