Open lucasgueiros opened 1 year ago
It would be nice if you can provide a test that fails before your changes and passes afterwards (so that it would catch any future regression)!
Thanks, @claudep ! I wrote 3 tests and altered one more. They fail with the current code but pass with my commits. I also added max_length and min_length validatiosn to the forms.BRZipCodeFIeld, so I could write it a test case similar to BRCPFFIeld and BRCNPJField. Finnaly, I removed the formfield override I made to BRStateField because it doesn't changed anything on the field behaviour. In future, it would be possible to enhance this field and, maybe, this override would be valuable. I will send all change as a Pull Request.
Hello. The Model Fields on Brazilian localflavor does not override the method
formfield
. By instance, the BRPostalCodeField is defined as:But in other countries this method was overrided. As instance, this is the Canadian PostalCode:
I made this change on Brazilian fields and it has passed all the tests. Do I need to write more tests or I can already submit a pull request?