[OpenWrt-Devel] How to check the field is empty?

2013-01-21 Thread . Elvis
hi all, If the field does not enter a value, how can display a warning message(You must enter a value) ! code = s:option(Value, code, translate(Code)) code.password = true thanks all, ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org

Re: [OpenWrt-Devel] How to check the field is empty?

2013-01-21 Thread Nguyễn Hồng Quân
Add this attribute to your option: .optional = false Your example will become: code = s:option(Value, code, translate(Code)) code.option = false (Don't understand what password means and why it is there). On Mon 21 Jan 2013 05:25:19 PM ICT, . Elvis wrote: hi all, If the field does not enter a