addCondition:labelled does not seem to be working the way I expected.
I just want to validate that a given text field is not empty
I have a description definition method and setter:
descriptionTags
^MAStringDescription new
selectorAccessor: #tagsConverter;
label: 'Tags';
priority: 40;
addCondition: [:value | value notEmpty ]
labelled: 'Please provide at least one tag';
yourself
tagsConverter: aString
tags := aString asUppercase subStrings asSet
On submit, I get an error that nil does not understand asUppercase.
Shouldn't the condition fail before the setter is called? I've tried [
:value | value notNil ], and beRequired as well, got the same error. I also
tried to change the initialize method of the object I'm describing to set
tags to an empty collection but that didn't work either.
Thanks,
Joel