[luci] CBI: Validate a field based on the value of another field?
Luca Olivetti
luca at ventoso.org
Thu Jul 31 14:23:15 CEST 2014
El 31/07/14 14:02, Jo-Philipp Wich ha escrit:
> Hi,
>
>> function rtp_last.validate(self,value)
>
> The third argument to that function should be the section id:
>
> function rtp_last.validate(self, value, sid)
Thank you! that worked.
I also (unsurprisingly) had to change
f=self.section.fields.rtp_port_first
rtp_first=f:formvalue(f:cbid(sid))
to
rtp_first=self.map:formvalue(f:cbid(sid))
I suppose there isn't a way to do it client side (specifying a datatype)
without custom javascript.
Bye
--
Luca
More information about the luci
mailing list