Kamil,You should add "return true;" at the end of the custom code to
meet the condition criteria.For the use case you have described, I would
consider creating a single rule that gets fired on the button click. At
that moment it should be possible to pull the values from both inputs
using a custom JS code. In other words, if you are confident in JS and
do not need to capture the input fields values unless the visitor
submits the form, consider a single rule.