Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions classes/models/fields/FrmFieldNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ protected function validate_step( &$errors, $args ) {
$errors[ 'field' . $args['id'] ] = sprintf(
// Translators: %1$s: the first nearest value; %2$s: the second nearest value.
__( 'Please enter a valid value. Two nearest valid values are %1$s and %2$s', 'formidable' ),
floatval( $result[0] ),
floatval( $result[1] )
is_numeric( $result[0] ) ? floatval( $result[0] ) : $result[0],
Comment thread
Crabcyborg marked this conversation as resolved.
is_numeric( $result[1] ) ? floatval( $result[1] ) : $result[1]
);
}

Expand All @@ -127,7 +127,7 @@ protected function validate_step( &$errors, $args ) {
* @param numeric $step The step.
* @return array|int Return `0` if valid. Otherwise, return an array contains two nearest values.
*/
private function check_value_is_valid_with_step( $value, $step ) {
protected function check_value_is_valid_with_step( $value, $step ) {
// Count the number of decimals.
$decimals = max( FrmAppHelper::count_decimals( $value ), FrmAppHelper::count_decimals( $step ) );

Expand Down