but without having having to specifically write the label by hand. Essentially the naming of our attributes is such that it'd be okay to pass a function accessing to this to the .label method so that we could just return the attribute name but in a human readable way.
I'm suggesting an implementation by giving an example but there must be a way to achieve this that I'm not aware of (maybe with all the $_ properties).
I'm trying to achieve the following...
but without having having to specifically write the label by hand. Essentially the naming of our attributes is such that it'd be okay to pass a function accessing to
this
to the.label
method so that we could just return the attribute name but in a human readable way.I'm suggesting an implementation by giving an example but there must be a way to achieve this that I'm not aware of (maybe with all the
$_
properties).Which would make my validators spit an error like
"My field is required"
Hope you understand what I'm trying to achieve.