Closed chazzu closed 10 years ago
Generally, I would say that modifying modules like this is a bad idea - although certainly not as bad as adding a custom method to a global object like Array
.
Why could you not create your own little wrapper module that uses custom
? Could you maybe show some example code that compares the two approaches?
If you add form.Field = Field into form.js, others could modify the Field prototype for 'cleaner' custom validators and filters. Is there any particular reason you chose not to do this? Legitimately curious if there is a reason this might be a bad practice.