• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Validation of text inputs and showing an error message

Community Beginner ,
Jan 09, 2020 Jan 09, 2020

Copy link to clipboard

Copied

Hello,

 

in the SDK docs of the LrView there is this function mentioned:

 

validate : (Read-Only)A function called to validate the value. (function, default: nil) The function takes this form:

myValidate( view, value )

Parameters:

  1. view (LrView) This control.
  2. value (any) The value to validate.

Returns three values:

  1. result (Boolean) True if value was valid.
  2. value (any) The new value.
  3. message (string) If result is false, an error message.

First supported in version 1.3 of the Lightroom SDK.

 

This works fine, but I am wondering where the error message can be shown? I have no glue what I need to do to show the message to the user.

 

Thanks in advance

Thorsten

 

TOPICS
SDK

Views

289

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jan 09, 2020 Jan 09, 2020

Already resoved by me 🙂 If I lost the focus of the input field I get a message box with the error message.

Votes

Translate

Translate
Community Beginner ,
Jan 09, 2020 Jan 09, 2020

Copy link to clipboard

Copied

LATEST

Already resoved by me 🙂 If I lost the focus of the input field I get a message box with the error message.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines