【问题标题】:react native t-comb, is there any way to style the error message?react native t-comb,有什么方法可以设置错误消息的样式吗?
【发布时间】:2018-11-17 22:44:22
【问题描述】:

我有一个输入,我想更改(例如)它的 fontFamily。 我在文档中找不到任何解决方案。 有什么办法可以改变错误信息的样式吗?

【问题讨论】:

    标签: validation react-native tcomb-form-native


    【解决方案1】:

    我找到了答案,只需要在字段中添加错误属性:

    this.options = {
                auto: 'placeholders',
                fields: {
                    phone: {
                        placeholder:'شماره تلفن',
                        placeholderTextColor: '#d1d5da',
                        stylesheet: stylesheet,
                        error: <Text style={[styles.font, styles.f13, {textAlign: 'left', color: "#ba2819"}]}>YOUR ERR</Text>
                    },
    
                }
            };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多